This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Calculation problem

Old posts that have not been replied to for several years.
Locked
-
-W0kk3L-
Voice
Posts: 24
Joined: Sun Feb 23, 2003 7:23 pm

Calculation problem

Post by -W0kk3L- »

Hey, can anyone help me with a little bit of tcl....

i have a number, say 659, and i want to take off as many times 256 as possible. And i want the rest put in a variable....

example 1:
659 is the start number....
659 - 256 - 256 = 147. Place 147 (the rest) in a variable.

example 2:
1435 is the startnumber....
1435-256-256-256-256-256 = 155. Place 155 (the rest) in a variable.

Anyone got an idea how i do this in tcl?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Code: Select all

expr {1435%256}
Have you ever read "The Manual"?
-
-W0kk3L-
Voice
Posts: 24
Joined: Sun Feb 23, 2003 7:23 pm

Post by -W0kk3L- »

Thank you :)
Locked