Version 14 of Search

Updated 2011-10-31 12:40:01 by jdc

The Tclers Wiki search page is available at http://wiki.tcl.tk/_/search . This search corresponds to the search in titles box in the left column. It is based on sqlite's full text search . The search string is passed as MATCH argument, including the * characters. Check http://www.sqlite.org/fts3.html for more information about sqlite and full text search.

jdc 31-oct 2011 The * used in previous versions of the search to distinguish between searching in titlea or page content is now longer supported. Searches are now always done on titles and page contenst. The result are listed sorted on the last-edit-data, most recent firsts. An extra column indicates where the match was found: in the page name or contents.

The sqlite in use at the wiki has been compiled with -DSQLITE_ENABLE_FTS3_PARENTHESIS so the Enhanced Query Syntax is available. This makes is possible to do the searches with an implicit AND as before but also allows you to refine your search using the AND, OR and NOT keywords.


Here below, you'll find the old content of page 2.


During Feb, 2002, Gerald Lester posted some basic Tcl code to news:comp.lang.tcl implementing version 0.1 of a Tcl script level package to perform packed decimal math. For a C based solution to precise math, see mpexpr.


   package provide packedDecimal 0.1
   
   namespace eval packedDecimal {
       namespace export add subtract multiply divide setDecimals
   
       variable decimals 2
       variable formatString {%d.%2.2d}
       variable carry 100
   }
   
   proc packedDecimal::add {a b} {
       variable decimals
       variable formatString
   
       scan $a %d.%d a1 a2
       scan $b %d.%d b1 b2
       incr a2 $b2
       if {[string length $a2] > $decimals} then {
           incr a1 1
           set a2 [string range $a2 1 end]
       }
       incr a1 $b1
       return [format $formatString $a1 $a2]
   }
   
   proc packedDecimal::subtract {a b} {
       variable decimals
       variable formatString
       variable carry
   
       scan $a %d.%d a1 a2
       scan $b %d.%d b1 b2
       incr a2 -$b2
       if {$a2 < 0} then {
           incr b1 1
           set a2 [expr {$carry + $a2}]
       }
       incr a1 -$b1
       return [format $formatString $a1 $a2]
   }
   
   proc packedDecimal::multiple {a b} {
       variable decimals
       variable formatString
   
       return -code error {Sorry, Multiple is not yet implemented!}
   }
   
   proc packedDecimal::divide {a b} {
       variable decimals
       variable formatString
   
       return -code error {Sorry, Divide is not yet implemented!}
   }
   
   proc packedDecimal::setDecimals {a} {
       variable decimals
       variable formatString
       variable carry 100
   
       set formatString [format {%%d.%%%d.%dd} $a $a]
       set decimals $a
       set carry [format "1%${a}.${a}d" 0]
       return;
   }
   
   proc packedDecimal::getDecimals {} {
       variable decimals
   
       return $decimals
   }