Previous Topic: Error Codes (Desktop Management Scripting Language)Next Topic: Labels


Declare Variables

Declare a variable before using it in a script and declare a variable before assigning a value to it.

To declare script variables, use the DIM keyword.

The basic types of variables and their default values are as follows:

Boolean

unsigned char (False)

Integer

long (0)

String

char * ("")

Char

wchar_t (0)

Byte

unsigned char (0)

Word

unsigned short (0)

Short

short (0)

Examples:

DIM MyIntegerVar as Integer
DIM MyStringVar as String
MyIntegerVar = 1234
MyStringVar = "This is a string."

DIM C1, C2, C3 as Char
C1 = 0x61
C2 = 0x0061
C3 = "a"
rem C1, C2, C3 - all the same character