Diff for /parser3/www/htdocs/Attic/_bug.html between versions 1.35 and 1.117

version 1.35, 2004/03/25 11:51:19 version 1.117, 2006/04/09 13:38:48
Line 1 Line 1
 @auto[]  
 $request:charset[windows-1251]  
 $response:charset[windows-1251]  
   
   $hash[
 @main[]          $.1(1)
 $table[^table::create{pet          $.2(2)
 cat     milk}]  
 $hash[^table.hash[pet]]  
 ^display[$hash]  
   
 @main[]  
 ^connect[mysql://root@localhost/paf]{  
   
 $hash[^hash::sql{select 'cat' as pet  
 #, 'milk' as food  
 }]  
 ^display_hash[$hash]  
   
   
 }  
   
 @main[]  
 ^connect[mysql://root@localhost/paf]{  
         $participants[^hash::sql{select 'feodor' as participant }]  
 }  
   
 #:даст хеш такой структуры:  
 $participantsZ[  
         $.alex(1)  
         $.boris(1)  
 ]  ]
   ^hash.foreach[k;v]{
 #:из которого можно эффективно извлекать информацию, например, так:          k=$k,v=$v^break[];!
 $person[feodor]  
 $person ^if($participants.$person){участвует}{не участвует} в мероприятии  
 }  }
   
   $table[^table::create{a
 @display_hash[hash]  1
 #$hash.a.a  2
 ^hash.foreach[k;v]{hash $k=(  3}]
 ^if($v is hash){^display_hash[$v]}{  ^table.menu{
 ^if($v is bool){bool ^if($v){true;false}}{string $v}          <$table.a^if($table.a==2){^break[]!}>
 }  
 }[,]  }[,]
   -------------
   
 )^#0A}]  ^while(1<2){
           $i($i+1)
           ^if(1<3){
 @main[]          {
 $name[ Вася ]          <$i^if($i==3){^break[]}>
 "$name"          }
 "^name.trim[]"          }
   }
   
 $path[/section/subsection/]  ^for[i](1;3){
 ^path.trim[end;/]          $i before
           ^if($i==2){^continue[]}
           after
   }[,]
   
 @main[]  $response:paf[test]
 $xdoc[^xdoc::create{<?xml version="1.0"?>  $response:paf[]
 <document xmlns:s="urn:special">  ---
         <s:code>string</s:code>  $hashfile[^hashfile::open[hf]]
 </document>  $hashfile.1(1)
 }]  $hashfile.2(2)
 $xdoc.search-namespaces.s[urn:special]  ^hashfile.foreach[k;v]{
 ^xdoc.selectString[string(//s:code)]          k=$k,v=$v^break[];!
   }

Removed from v.1.35  
changed lines
  Added in v.1.117


E-mail: