Amos Professional Manual  Contents  Index

Control Structures


EVERY ON
EVERY OFF
instruction: toggle regular EVERY calls
Every On
Every Off

As explained, EVERY ON should be used before the relevant sub-routine or procedure has finished executing. EVERY OFF is the default condition, and is used to disable the automatic calling process altogether.

Handling data

DATA
structure: place a list of data items in a program
Data list

A DATA statement lets you include whole lists of useful information in your programs. Each item in the list must be separated by a comma, like this:

X> Data 1,2,3,4

Also each DATA instruction must be the only statement on the current line, because anything that follows it will be ignored! Prove that with the following line:

E> Read A$: Print A$
   Data "I am legal" : Print "But I am not!"

Data can be "read" into one or more variables, and unlike many Basic languages, AMOS Professional allows you to include expressions as part of your data. So the following lines of code are all equally acceptable:

X> Data $FF50,$890
   Data %11111111,%110011010110
   Data A
   Label: Data A+3/2.0-Sin(B)
   Data "AMOS"+"Professional"

Examine those lines, and note that the A at Label will be input as the contents of variable A, and not the character A. The expression will be evaluated using the latest value of A.

Data statements may be placed at any position in your program, but any data stored inside an AMOS Professional procedure will not be accessible from the main program. Each procedure can have its own individual set of data statements, which are completely independent from the rest of the program.

Back    Next
05.04.12