--- parser3/www/htdocs/Attic/_bug.html 2004/03/25 11:51:19 1.35 +++ parser3/www/htdocs/Attic/_bug.html 2004/12/23 14:51:32 1.74 @@ -1,66 +1,41 @@ -@auto[] -$request:charset[windows-1251] -$response:charset[windows-1251] - - -@main[] -$table[^table::create{pet -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] - - -} +@print[title;hash][key;value] +

$title ^hash.foreach[key;value]{$key}[ | ]

+=$hash.[zzz].rrggbb= @main[] -^connect[mysql://root@localhost/paf]{ - $participants[^hash::sql{select 'feodor' as participant }] -} - -#:даст хеш такой структуры: -$participantsZ[ - $.alex(1) - $.boris(1) +$table[^table::create{color rrggbb +red ff0000 +green 00ff00 +blue 0000ff +_default 000000} ] -#:из которого можно эффективно извлекать информацию, например, так: -$person[feodor] -$person ^if($participants.$person){участвует}{не участвует} в мероприятии -} +$c_hash[ + $.red[ + $.color[red] + $.rrggbb[ff0000] + ] + $.green[ + $.color[green] + $.rrggbb[00ff00] + ] + $.blue[ + $.color[blue] + $.rrggbb[0000ff] + ] + $._default[ + $.color[_default] + $.rrggbb[000000] + ] +] +$a_hash[^table.hash[color]] +^print[a_hash:;$a_hash] -@display_hash[hash] -#$hash.a.a -^hash.foreach[k;v]{hash $k=( -^if($v is hash){^display_hash[$v]}{ -^if($v is bool){bool ^if($v){true;false}}{string $v} +$b_hash[^hash::create[]] +^table.menu{ + ^b_hash.add[$.[$table.color][$table.fields]] } -}[,] - -)^#0A}] - +^print[b_hash:;$b_hash] -@main[] -$name[ Вася ] -"$name" -"^name.trim[]" - -$path[/section/subsection/] -^path.trim[end;/] - -@main[] -$xdoc[^xdoc::create{ - - string - -}] -$xdoc.search-namespaces.s[urn:special] -^xdoc.selectString[string(//s:code)] +^print[c_hash:;$c_hash] \ No newline at end of file