Any parameter can be left out, as long as its comma remains in place. When this happens, AMOS professional will check to see what the current value is, or if there is a default value for this parameter, and automatically assign this value to the parameter that has been omitted. For example:
E> Ink 0,1,2 : Rem Set drawing, background and border colour Ink 3,, : Rem Set drawing colour only Ink ,4, : Rem Set background, leave drawing and border colours alone
Procedures
The more complex the skeleton of a program gets, the easier it is to get lost among all
of its routes and connections. Experienced programmers usually split their programs into small
units known as "procedures", which allow one aspect of the program to be tackled at a time,
without getting distracted by everything else that is going on.
AMOS Professional offers all the advantages of using procedures in the most convenient way, and Chapter 5.5 is dedicated to a full explanation of how to exploit them. You will learn how each procedure module can be given its own specially defined variables and parameters, and how to take best advantage of them.
Controlling a program skeleton
Once a program is running, there are a number of ways to stop it in its tracks,
allowing you to control what happens next.
WAIT
instruction: wait before performing the next instruction
Wait number of 50ths of a second
The WAIT command tells the computer to stop the program and wait for as long as you want before moving on to the next instruction. The number that follows it is the waiting time, specified in 50ths of a second.
The following example forces the program to wait for two seconds:
E> Print "I am the first instruction." Wait 100 Print "I am the next instruction."
END
instruction: end the current program
End
As soon as the END command is recognised, it stops the program. You can either press the [Esc] key to go to Direct Mode, or use the [Spacebar] to get to the Edit Screen. Try this example now:
E> Print "I am the first instruction." Wait 150 End Print "This instruction will never be executed!"