|
From: Ernesto B. <eb...@pe...> - 2000-10-05 18:26:35
|
Hi! I would be able to work with unsigned integers (IP adresses) on TCL, using the expr or other functions on it. Currently this doesn't work, if my integer is larger than an signed integer, it gets negative: ernst@milka:/u/ernst > tclsh8.2 % expr 3585808128 + 1 -709159167 Will this be enhanced in TCL 8.4? Would be great! :) I now have to use the float to make calculations, and then split on the "." and lindex 0, because: % expr 3585808128.0 + 1 3585808129.0 % expr round(3585808129.0) integer value too large to represent So I have to do this ugly hack: % expr 3585808128.0 + 1 3585808129.0 % lindex [split 3585808129.0 "."] 0 3585808129 (Maybe there is another (better) way?). -- PEM InterComputing GmbH Ein Unternehmen der ISION Internet AG Ernesto Baschny (EB2351-RIPE) Programmierer Vaihingerstraße 55 D-70567 Stuttgart Phone: +49 711 1618-380 Fax: +49 711 1618-333 eMail: eb...@pe... Web: www.pemic.de -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |