Diff for /parser3/tests/129.html between versions 1.3 and 1.4

version 1.3, 2007/08/17 10:51:43 version 1.4, 2008/05/29 10:02:35
Line 8  third e Line 8  third e
 }]  }]
   
   
 <b>^$.distinct[tables]</b><br />  ^do[unique key, no value columns, no options]{
 ^print[^table.hash[group][          ^table.hash[name]
         $.distinct[tables]  }
 ]]  
   
   
 <hr />  
 <b>^$.distinct(1) ^$.type[table]</b><br />  
 ^print[^table.hash[group][  
         $.distinct(1)  
         $.type[table]  
 ]]  
   
   
 <hr />  
 <b>^$.distinct(1) ^$.type[hash]</b><br />  
 ^print[^table.hash[group][  
         $.distinct(1)  
         $.type[hash]  
 ]]  
   
   
 <hr />  ^do[non-unique key, no value columns, no options]{
 <b>^$.distinct(1) ^$.type[string]</b><br />          ^table.hash[group]
 ^try{  }[if key not unique ^$.distinct(1) must be specified]
         ^print[^table.hash[group][  
   
   ^do[non-unique key, no value columns, options: ^$.distinct[tables] (backward)]{
           ^table.hash[group][
                   $.distinct[tables]
           ]
   }
   
   
   ^do[non-unique key, no value columns, options: ^$.distinct[tables], ^$.type[hash] ]{
           ^table.hash[group][
                   $.distinct[tables]
                   $.type[hash]
           ]
   }[^$.distinct[tables] and ^$.type[...] can't be specified together]
   
   
   ^do[non-unique key, no value columns, options: ^$.distinct(1) ^$.type[table]]{
           ^table.hash[group][
                   $.distinct(1)
                   $.type[table]
           ]
   }
   
   
   ^do[non-unique key, no value columns, options: ^$.distinct(1) ^$.type[table]]{
           ^table.hash[group][
                   $.type[table]
           ]
   }[non unique key without distinct option]
   
   
   ^do[unique key, no value columns, options: ^$.type[table]]{
           ^table.hash[name][
                   $.type[table]
           ]
   }
   
   
   ^do[non-unique key, no value columns, options: ^$.distinct(1) ^$.type[hash]]{
           ^table.hash[group][
                   $.distinct(1)
                   $.type[hash]
           ]
   }
   
   
   ^do[non-unique key, no value columns, options: ^$.distinct(1) (as above because ^$.type[hash] == default)]{
           ^table.hash[group][
                   $.distinct(1)
           ]
   }
   
   
   ^do[non-unique key, no value columns, options: ^$.distinct(1) ^$.type[string]]{
           ^table.hash[group][
                 $.distinct(1)                  $.distinct(1)
                 $.type[string]                  $.type[string]
         ]]          ]
   }[with ^$.type[string] only one field must be specified]
   
   
   ^do[non-unique key, one value column (name), options: ^$.distinct(1) ^$.type[string]]{
           ^table.hash[group;name][
                   $.distinct(1)
                   $.type[string]
           ]
   }
   
   
   
   
   @do[sTitle;jCode;sExceptionComment][h]
   <h3>$sTitle</h3>
   ^try{
           $h[$jCode]
           ^print[$h]
 }{  }{
         ^if($exception.type eq parser.runtime){          ^if($exception.type eq "parser.runtime"){
                 failed, that's OK.  
                 <br />with ^$.type[string] only one field must be specified  
                 $exception.handled(1)                  $exception.handled(1)
                   ^if(def $sExceptionComment){
                           failed, that's OK.<br />
                           $sExceptionComment
                   }{
                           something wrong
                   }
         }          }
 }  }
   
   
 <hr />  
 <b>^$.distinct(1) ^$.type[string]</b><br />  
 ^print[^table.hash[group;name][  
         $.distinct(1)  
         $.type[string]  
 ]]  
   
   
 @print[hData][sKey;value]  @print[hData][sKey;value]
 ^hData.foreach[sKey;value]{  ^hData.foreach[sKey;value]{
         $sKey ^if($value is "table"){^value.menu{$value.name}[,]}{^if($value is "string"){$value}{^if($value is "hash"){<blockquote>^print[$value]</blockquote>}}}<br />          $sKey ^if($value is "table"){^value.menu{$value.name}[,]}{^if($value is "string"){$value}{^if($value is "hash"){<blockquote>^print[$value]</blockquote>}}}<br />
 }  
   
   }

Removed from v.1.3  
changed lines
  Added in v.1.4


E-mail: