On 17/03/2012 13:30, physiologoius wrote:
> tcl_platform(wordSize) is a useful way of finding out whether the
> executable is 32bit or 64bit. But, as mention Tcl'ers wiki it is not
> available across platforms -
http://wiki.tcl.tk/1649
It's more correct to say that it is only present on a sufficiently
modern version of Tcl; tcl_platform(wordSize) was "only" introduced in
Tcl 8.4 after all. But the right thing to do there is to put this at the
start of your script:
package require Tcl 8.4
If that fails, there's no tcl_platform(wordSize) to check. There's also
a machine that's running something that's no longer supported even for
security fixes. Tcl 8.3 (and before) SHOULD NOT BE USED for normal
software deployment. I wouldn't really encourage sticking with just the
8.4 feature set either, to be honest. 8.5 is our full production-grade
release.
Of course, if you _do_ have 8.4 then you have a simple portable word
size check: $tcl_platform(wordSize) :-)
Donal.