Forum OpenACS Q&A: expr int(-1) strange problem

Collapse
Posted by Cheng-Yi Hsu on
I got a very strange problem, in SUN Blade 1000 workstation 
OS: Solaris 8
AOL: 3.4.2 
GCC: 2.95.3 with gcc-2.95.3-sol8-sparc-local

set x [expr int(-1)]

should return -1
but Blade 1000 give me a error , I had try this on linux/sun ultra 
1/solaris x86 , and all of them work fine !
Any idea ?


Collapse
Posted by Cheng-Yi Hsu on
Sorry , int(-1) will be fine 
but int(-1.5) will get error 
integer value too large to represent
    while executing
"expr int($y)"
    invoked from within chunk: 0 of adp: /web/tango/www/tango/test/t16.adp
    invoked from within
"ns_adp_parse -file [ad_conn file"
    (procedure "rp_handle_adp_request" line 3)
    invoked from within
"rp_handle_adp_request"
    invoked from within
"catch $handler error"
    invoked from within
"rp_abstract_url_server"
Collapse
Posted by Jonathan Ellis on
what error do you get?  Is this in aolserver, or tclsh?
Collapse
Posted by Cheng-Yi Hsu on
I test it under aolserver nsd8x, Now I found my sparc platform has this problem (include blade 1000, ultra 1, ultra 60, 220R) , but in
solaris x86 , linux are fine !
Collapse
Posted by Jonathan Ellis on
(Sorry about the apparently redundant question; I started typing it before your answer showed up on the bboard.)

The only sparc I have is a SS 10 and it works fine there... It's possibly related to your 64-bit architecture. (There have been bugs with tcl on 64 bit machines before, but nothing recent that I could find.) Do you have the most recent version of tcl installed, and did you try this in tclsh?

Collapse
Posted by Cheng-Yi Hsu on
I have check out aolserver 4.0b from sourceforge.net , it use tcl8.3.4 , and works fine , so I think this is a bug in aolserver 3.4.2 (tcl 8.3.2) , I'm trying to replace tcl8.3.2 in aolserver 3.4.2 , but still have problem in Makefile !