PICBASIC PLUS LITE Manual - Profe Saul
PICBASIC PLUS LITE Manual - Profe Saul
PICBASIC PLUS LITE Manual - Profe Saul
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>PICBASIC</strong> <strong>PLUS</strong> Compiler5.21. DIMSyntax : DIM Variable { as } { Size }Overview :Operators :Example 1 :Example 2 :Notes :All user-defined variables must be declared using the DIM statement.Variable can be any alphanumeric character or string.as is required when the size of the variable is stated.Size is the physical size of the variable, it may be BIT, BYTE, orWORD.‘ Declare the variables all as BYTE sizedDIM A , B , My_Var , fred , cat , zz‘ Declare different sized variablesDIM Var as BYTE ‘ Declare an 8-bit BYTE sized variableDIM Wrd as WORD ‘ Declare a 16-bit WORD sized variableDIM BitVar as BIT ‘ Declare a 1-bit BIT sized variableAny variable that is declared without the ‘as‘ text after it, will assumean 8-bit BYTE type.DIM should be placed near the beginning of the program. Any referencesto variables not declared or before they are declared will produceerrors.Variable names, as in the case or labels, may freely mix numeric contentand underscores.DIM MyVar as BYTEorDIM My_Var as BYTEorDIM My_Var2 as BYTEVariable names may start with an underscore, but must not start witha number. They can be no more than 32 characters long. Any charactersafter this limit will be ignored.DIM 2MyVaris NOT allowed.Variable names are case insensitive, which means that the variable: -DIM MyVaRIs the same as…DIM MYVAR54Copyright Crownhill 2001