Naming Variables

Top  Previous  Next

Variable names must begin with a letter and must be no longer than 64 characters. It can be made up of the following characters:

 

_                The underscore character
$                The dollar sign
A-Z or a-z        Any letters
0-9                Any combination of digits

 

The following are all valid variable names:

 

aVariable

aVariable2000

a_variable

a_variable_2000

a_variable$

 

The following are NOT valid variable names because they begin with a numeric character:

 

2000variable

12_variable

 

In addition, the following list of words should not be used as variable names, as they are interpreted by the code for a specific purpose.  This list is case insensitive - neither the variable "UNITSIZE" nor "unitsize" can be used.

 

abs

AbsoluteValue

acos

and

ArcCosine

ArcSine

ArcTangent

ArcTangentXY

asc

ascii

asciiToCharacters

asFloating

asin

asInteger

asString

atan

atan2

beep

block

broker

CanAddUnit

chr

clearscreen

cos

cosine

dayOfMonth

DegreesToRadians

degtorad

do

else

endfunction

endif

endsub

endwhile

entryPrice

exp

exponent

false

findString

findString

for

function

goto

hypot

hypot

hypotenuse

if

instrument

isFloating

isInteger

isString

lcase

left

leftCharacters

len

log

log10

 

long

loop

lowerCase

ltrim

max

mid

middleCharacters

min

mod

monthNumber

newPosition

next

not

or

order

out

pi

print

RadiansToDegrees

random

right

rightCharacters

rtrim

short

sin

sine

sqr

sqr

squareRoot

step

stringLength

sub

system

tan

tangent

test

then

to

toJulian

totalRisk

trim

trimLeftSpaces

trimRightCharacters

trimRightSpaces

trimSpaces

true

type

type

ucase

unitSize

until

upperCase

variables

variables

while

xor