Amos Professional Manual  Contents  Index

the Bare Bones


Think of a variable as the name of a place where a value resides, and that the value can change as the result of a calculation made by your computer. Like strings, variables are given their own names, and once a name has been chosen it can be given a value, like this:

	
E> SCORE=100
   Print SCORE

That example creates a variable with the name of SCORE, and loads it with a value of 100.

Naming variables
The rules for the naming of variables are very simple. Firstly, all variable names must begin with a letter, so the following variable name is fine:

	
E> AMOS2=1
   Print AMOS2

But the next name is not allowed:

	
X> 2AMOS=1

Secondly, you cannot begin a variable name with the letters that make up one of the AMOS Professional command words, because this would confuse your Amiga. The following variable name is acceptable, because the first letters are not used by one of the AMOS Professional commands:

E> FOOTPRINT=1
   Print FOOTPRINT

But the next name is unacceptable, because the computer recognises the first five letters as the command PRINT:

X> PRINTFOOT=1

If you try and type in an illegal variable name, AMOS Professional will spot the mistake, and point it out by splitting the illegal characters away from the rest of the name. A full list of the command words can be found in the Command Index, in Appendix H of this User Guide.

Variable names can be as short as one character, and as long as 255 characters, but they can never contain a blank space. So the next name is allowed:

E> AMOSPRO=1
   Print AMOSPRO

But this is an illegal variable name:

X> AMOS PRO=1
Back    Next
05.01.02