Thanks,
Bob
Not checked, but what about ::tcl_platform(wordSize|pointerSize) ?
-Alex
Or the new (8.6?) platform package:
package require platform
platform::generic
> win32-ix86
George
Doesn't it say 64b as soon as the _processor_ is 64b, regardless of
whether the executable is in 32-bit mode ?
That's what I assume tcl_platform to be smart about... maybe I'm
wrong :)
-Alex
The example I gave was from ActiveTcl 8.6 beta (32 bit), running on
Windows 7 64 bit, on an 64 bit processor. To my understanding it returns
the architecture Tcl was compiled for.
George
What is the purpose of that detection? What decision does it enable?
Donal.
set ver32 1
foreach f [info loaded] {if {[string first "x86_64" $f] != -1} {set ver32 0}}
Bob
The purpose of the detection is to disable some features of the application that are not available in the 64-bit version because some of the packages used by the application, do not have 64-bit versions.
There was also another odd difference between the 32 and 64-bit versions. Sometimes one of the procedures gets called recursively hundreds of times. I had determined on the 32-bit version that there was a limit to the recursion of about 600 times before it would crash with an error about a stack limit and an infinite loop. With the 64-bit version this limit is around 500 times.
Bob
Then why not simply
if {[catch {package require somepackage}]} {
# disable features provided by 'somepackage'
}
?
R'