Version 4 of wide

Updated 2007-11-10 21:28:45 by dkf

[discuss what tcl considers a variable of type wide]

An expr function that converts a number to a "wide integer" (i.e. an integer of at least 64-bits precision).

As JH observes on comp.lang.tcl, if you want a wide result, be sure to apply wide to one of the values in the expression - not the result of the expression.

In other words, this will not give you a wide result:

 expr wide( 80 * 1000000000 )

while this will:

 expr wide( 80 ) * 1000000000 

Of course, this applies to Tcl 8.4 and earlier. With Tcl 8.5, the expression works without the wide!