HTBasic Help
×
Menu
Index

INTEGER

Declares and dimensions INTEGER variables.
 
 INTEGER item [,item...]
 
Usage:
INTEGER I,J,K
INTEGER A,J,Cnt,Point,X(100)
INTEGER Iarray(-128:127,16)
INTEGER Buff(600) BUFFER
 
Example:          INTEGER.BAS
 
Description:
The INTEGER statement is used to declare scalar and array variables of type integer. An INTEGER variable uses two bytes of storage space. Integer variables conserve memory and integer operations are faster than REAL. REAL is the default type. Bit by bit logical operations may be performed on integer variables.
The maximum number of array dimensions is six and the lower bound must be less than or equal to the upper bound value. Each dimension may contain a maximum of 32,767 elements. An INTEGER variable may be declared a buffer by specifying the BUFFER keyword after the variable name. Buffer variables are used with the TRANSFER statement.
 
Any number of INTEGER statements are allowed, anywhere in the program; however, an INTEGER statement may not appear before an OPTION BASE statement. Memory allocation is made during prerun and cannot be dynamically deallocated. However, the dimensions can be changed in a limited way by REDIM. Use ALLOCATE and DEALLOCATE for dynamic memory allocation.
 
See Also: