Int Symbol Type


Cog's int is short for integer. Integer's are whole numbers - numbers without a decimal portion. Syntax:
int     var1     local

And to assign an initial value, use:

int     var1=5     local

Cog's integer is a signed 32 bit integer.

The maximum integer is 2,147,483,648. That integer will always be negative. However, one less than that works fine. Go above the maximum integer(maxint), and you get consistent, but worthless, numbers.

The minimum value an integer can have is -2,147,483,648. You get the same problems as going above the maxint if you try to go below the minimum integer.