ID:136247
![]() Feb 25 2003, 6:04 am
|
|
I've been testing the limits of built in numeric vars and there is one that confuses me. dir is limited as a value from 1 to 255. Why can't an atom have a dir of 0? It would still fit in a short integer, and 0 is no less valid than 255.
|
![]() Feb 26 2003, 5:10 pm
|
|
Because 0=null, not 0 as in a number. But im guessing i have no idea what your doing, so i could be wrong.
|
In DM, 0 does not equal null. You can not set the atom.dir var to 0, but it will accept any value from 1 to 255. An unsigned short integer (8 bits) can store a whole number from 0 to 255, so why is the 0 gone from dir? They aren't saving any space by leaving it out.
|
Shadowdarke wrote:
In DM, 0 does not equal null. You can not set the atom.dir var to 0, but it will accept any value from 1 to 255. An unsigned short integer (8 bits) can store a whole number from 0 to 255, so why is the 0 gone from dir? They aren't saving any space by leaving it out. An unsigned short can store any number from 0 to 65,535. You're thinking of a 'char'. =) |