Posted to tcl by dburns at Fri Aug 24 19:18:22 GMT 2012view raw
- This script gives different results (using the same three tclkit interpreters) depending on the underlying hardware architecture (windows XP - 32bit versus windows 7 - 64bit):
- # Script to check "format" problem
- puts stdout "'format' test script"
- #
- puts stdout "tcl_patchLevel = $tcl_patchLevel"
- parray tcl_platform
- #
- puts stdout "\nSetting x = \"[set x "-0.000"]\""
- puts stdout "Formatting x to %9.3f: \"[format %9.3f $x]\"\n"
- On 32-bit hardware, the "-" is stripped by format.
- On 64-bit hardware, the "-" is not stripped.
- The 32-bit results:
- 8.6b
- (testit) 1 % source testit
- 'format' test script
- tcl_patchLevel = 8.6b1.2
- tcl_platform(byteOrder) = littleEndian
- tcl_platform(machine) = intel
- tcl_platform(os) = Windows NT
- tcl_platform(osVersion) = 5.1
- tcl_platform(pathSeparator) = ;
- tcl_platform(platform) = windows
- tcl_platform(pointerSize) = 4
- tcl_platform(threaded) = 1
- tcl_platform(user) = IIEUSER
- tcl_platform(wordSize) = 4
- Setting x = "-0.000"
- Formatting x to %9.3f: " 0.000"
- (testit) 2 %
- 8510
- (testit) 1 % source testit
- 'format' test script
- tcl_patchLevel = 8.5.10
- tcl_platform(byteOrder) = littleEndian
- tcl_platform(machine) = intel
- tcl_platform(os) = Windows NT
- tcl_platform(osVersion) = 5.1
- tcl_platform(platform) = windows
- tcl_platform(pointerSize) = 4
- tcl_platform(threaded) = 1
- tcl_platform(user) = IIEUSER
- tcl_platform(wordSize) = 4
- Setting x = "-0.000"
- Formatting x to %9.3f: " 0.000"
- (testit) 2 %
- 8511
- (testit) 1 % source testit
- 'format' test script
- tcl_patchLevel = 8.5.11
- tcl_platform(byteOrder) = littleEndian
- tcl_platform(machine) = intel
- tcl_platform(os) = Windows NT
- tcl_platform(osVersion) = 5.1
- tcl_platform(platform) = windows
- tcl_platform(pointerSize) = 4
- tcl_platform(threaded) = 1
- tcl_platform(user) = IIEUSER
- tcl_platform(wordSize) = 4
- Setting x = "-0.000"
- Formatting x to %9.3f: " 0.000"
- (testit) 2 %
- Using the same three binary tclkit interpreter files on new 64-bit Dell hardware gives:
- 8.6b
- (testit) 1 % source testit
- 'format' test script
- tcl_patchLevel = 8.6b1.2
- tcl_platform(byteOrder) = littleEndian
- tcl_platform(machine) = intel
- tcl_platform(os) = Windows NT
- tcl_platform(osVersion) = 6.1
- tcl_platform(pathSeparator) = ;
- tcl_platform(platform) = windows
- tcl_platform(pointerSize) = 4
- tcl_platform(threaded) = 1
- tcl_platform(user) = photolog
- tcl_platform(wordSize) = 4
- Setting x = "-0.000"
- Formatting x to %9.3f: " -0.000"
- (testit) 2 %
- 8510
- (testit) 1 % source testit
- 'format' test script
- tcl_patchLevel = 8.5.10
- tcl_platform(byteOrder) = littleEndian
- tcl_platform(machine) = intel
- tcl_platform(os) = Windows NT
- tcl_platform(osVersion) = 6.1
- tcl_platform(platform) = windows
- tcl_platform(pointerSize) = 4
- tcl_platform(threaded) = 1
- tcl_platform(user) = photolog
- tcl_platform(wordSize) = 4
- Setting x = "-0.000"
- Formatting x to %9.3f: " -0.000"
- (testit) 2 %
- 8511
- (testit) 1 % source testit
- 'format' test script
- tcl_patchLevel = 8.5.11
- tcl_platform(byteOrder) = littleEndian
- tcl_platform(machine) = intel
- tcl_platform(os) = Windows NT
- tcl_platform(osVersion) = 6.1
- tcl_platform(platform) = windows
- tcl_platform(pointerSize) = 4
- tcl_platform(threaded) = 1
- tcl_platform(user) = photolog
- tcl_platform(wordSize) = 4
- Setting x = "-0.000"
- Formatting x to %9.3f: " -0.000"
- (testit) 2 %