Amos Professional Manual  Contents  Index

AMOS Interface


The use of quotation' marks in Interface programs is very important. You are recommended to use single quotation marks as above, instead of the conventional double quotes. This will avoid any confusion when Interface commands are typed into an ordinary AMOS Professional string.

Numbers may also be entered in Hexadecimal or Binary notation, if preferred. For example:

X> SetVar 2,$2A;
   SetVar 3,%101010;

PRint
Interface instruction: print contents of a variable to screen
PR x,y,number,ink;
PR x,y,'text',ink;

The PRint command is used to print the contents of a variable. After the command, the target coordinates should be specified, followed by the variable number or the string of characters to be printed. The final parameter is a colour index number, which determines the ink colour to be used. The following example prints a message at coordinates 10,10 using colour 2. Note the use of single quotation marks, which is explained above.

X> PRint 10,10,'Message',2;

The next example would print the contents of 1 VA at the coordinates 0,100 in ink colour 2:

X> PRint 0,100,1 VA,2;

The hash character # can be used as a special function, which converts a number into a string. It is similar to the normal AMOS Professional STR$ function. When using this, the following syntax must be observed:

X> PRint 0,110,1 VA #,2;

Expressions
AMOS Professional Interface expressions have been carefully optimised for speed, which is why they appear very different from the standard system.

All calculations are performed in reverse, with operations and functions after the numbers. So a normal expression like 1+2 is entered as 12+ for an Interface program. Similarly:

6*9 becomes 69*
8/2 is 82/
6-3 is generated by 63-

These expressions can be entered as part of a normal Interface command. Supposing you want to add one to the variable zero (0 VA). This could be achieved by using a line such as:

X> SetVar 0,0 VA 1+;
Back    Next
09.01.04