Log in

View Full Version : Integer Number


powercat
18-02-2003, 10:28
Greetings,
If I declare a variable as type Byte,
then I can only represent an integer
up to 255, correct ? Else, I have to
define it as type word ?

thanks.

Greg Ross
18-02-2003, 10:55
That's correct.

Jnadke
18-02-2003, 11:26
Actually, not even an integer. The term integer implies that negative numbers can be represented, which is untrue in the PBasic language. The correct term would be whole numbers up to 255.

A 'bit' represents the whole numbers 0 and 1
A 'nib' represents the whole numbers 0-15
A 'byte' represents the whole numbers 0-255
A 'word' represents the whole numbers 0-65535