'----------------------------------------------------
'              (c) 1999-2003 MCS Electronics
'              CONST.BAS
'----------------------------------------------------
'dimension some variables
Dim Z As String * 10
Dim B As Byte

'assign some constants
'constants dont use program memory
Const S = "test"
Const A = 5                                                   'declare a as a constant
Const B1 = &B1001

'or use an expression to assign a constant
Const X = (b1 * 3) + 2
Const Ssingle = Sin(1)


Print X
Print Ssingle


B = A
'the same as b = 5

Z = S
'the same as Z = "test"

Print A
Print B1
Print S


'you can use constants with conditional compilation
#if A = 5                                                   ' note there is no then
  Print "constant a is 5"
  #if S = "test"
    Print "nested example"
  #else                                                     ' else is optional
  #endif
#else
#endif

End