'--------------------------------------------------------------
'                     (c) 1999-2003 MCS Electronics
'--------------------------------------------------------------
'  file: DIM.BAS
'  demo: DIM
'--------------------------------------------------------------
Dim B1 As Bit                                                 'bit can be 0 or 1
Dim A As Byte                                                 'byte range from 0-255
Dim C As Integer                                              'integer range from -32767 - +32768
Dim L As Long
Dim W As Word
Dim S As String * 10                                          'length can be up to 10 characters

'new feature : you can specify the address of the variable
Dim K As Integer At 120
'the next dimensioned variable will be placed after variable s
Dim Kk As Integer


'Assign bits
B1 = 1                                  'or
Set B1                                  'use set

'Assign bytes
A = 12
A = A + 1

'Assign integer
C = -12
C = C + 100
Print C

W = 50000
Print W

'Assign long
L = 12345678
Print L

'Assign string
S = "Hello world"
Print S

End