Tcl 8.4 Version Help 
Author Message
 Tcl 8.4 Version Help

Hi

I recently downloaded and installed the tcl84a2 binary ( from
dev.scriptics )for WINDOWS.
Yesterday I installed the activetcl version 8.4.0.1.b2.2 for windows and
have noticed some
different effects.

I need the active version because of the enhanced fconfigure
capabilities but a crc script
that I have written will only run with the scriptics version.

Obviously my question is ............?

1. is the -handshake and -ttycontrol REALLY NOT included in the
scriptics version and if so

2. What's wrong with my crc script ( see below ). Using the scriptics
version I get a valid
  CRC and with the active version, I'm told that the 'integer value is
too large'.

NOTE:- if I make a few changes to the script below, then a crc16 is
possible with both versions.

Any ideas would be appreciated at this stage because I need both to work
in either one of the
versions.

Thanks for your time.

Huw

####################### crc32 script.

set polynom32 "any_ploynom_value"
set ulcrc32 "0xffffffff"
set x 0

# word32 is made of x bytes

############# CRC32 ##################
foreach val [ split $word32 {} ] {
    set lettername($x) $val
    incr x    

Quote:
}

for {set byteloop 0} {$byteloop<$x} {incr byteloop} {
    for {set bitloop 7} {$bitloop>=0} {incr bitloop -1} {

        binary scan $lettername($byteloop) c* value

        set value [expr {$value & 0xffff}]

        if {  [expr $value & (  1 << $bitloop ) ] ==0 } {
                set msgnextbit 0
                } else {
                set msgnextbit 1
                }

       set bcrc_msb_set [ expr ($ulcrc32  & ( 1 << 31 )) != 0 ]  

       set ulcrc32  [ expr ( $ulcrc32  << 1 ) | $msgnextbit ]

       if { $bcrc_msb_set ==1 } {
            set ulcrc32 [ expr $ulcrc32 ^ $polynom32  ]    
            }            
    }

Quote:
}

puts "\nCRC 32 : [format %X $ulcrc32 ]"


Tue, 09 Nov 2004 22:57:27 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ISO: Help regarding Tcl/Tk 8.4 Japanese Input Methods

2. new CONSTification of Tcl 8.4 (help)

3. Install tcl 8.4 error, Can't find a usable init.tcl in the following directories

4. Tcl SOAP - Tcl 8.4?!?!?! (Immediate Need)

5. Tcl 7.4 to Tcl 8.4 porting issues

6. Stubs with Tcl 8.3 vs Tcl 8.4

7. CONST Tcl 8.3 vs Tcl 8.4

8. pipeline problems with customized tclsh (version 8.4)

9. compatibility between versions 7.6 and 8.4

10. cross-version voodoo: handling 8.3 / 8.4 private structure changes

11. iwidget's toolbar not the same under version 8.4

12. OpenGL Bindings for Tcl/Tk 8.4

 

 
Powered by phpBB® Forum Software