User Tools

Site Tools

한국어

cubloc:dim:index

Dim

Dim VariableName As VariableType

There are 5 types of variables in Cubloc BASIC.

  • Byte : 8 bit positive number, 0 to 255
  • Integer : 16 bit positive number, 0 to 65535
  • Long : 32 bit positive/negative number (-2147483648 to +2147483647)
  • Single : 32 bit floating point number (-3.402823E+38 to 3.402823E+38)
  • String : character string, 0 TO 127 bytes

*For storing negative numbers, please use LONG or SINGLE. Use the Dim statement for declaring variables as shown below:

Dim A As Byte                  ' Declare A as Byte.
Dim B As Integer, C As Byte    ' Commas may NOT be used.
Dim ST1 As String * 12         ' Declare a String of 12 bytes.
Dim ST2 As String              ' String is 64 bytes default.
Dim AR(10) As Byte             ' Declare AR as a Byte Array.
Dim AK(10,20) As Integer       ' Declare AK as a 2-Dimensional Array

Go CUBLOC home

cubloc/dim/index.txt · Last modified: 2016/07/17 17:25 by COMFILE Technology