Amos Professional Manual  Contents  Index

the Bare Bones


E> Print TITLE$(0),PRICE#(0)
   Print TITLE$(99),YEAR(99),PRICE#(99)

These tables can have as many dimensions as you like, and each dimension can have up to 65,0(K) elements. Here are some more modest examples:

X> Dim LIST(5),NUMBER#(5,5,5),WORD$(5,5)

Constants
Constants are a special type of number or string that can be assigned to a variable, or used in a calculation. They are given this name because their value remains constant, and does not change during the course of the program.

AMOS Professional will normally treat all constants that are fractional numbers (floating point numbers) as whole numbers (integers), and convert them automatically, before they are used. For example:

E> A=3.141
   Print A

Any numbers that are typed into an AMOS Professional program are converted into a special format. When programs are listed, these numbers are converted back to their original form, and this can lead to minor discrepancies between the number that was originally typed in and the number that is displayed in the listing. There is no need to worry about this, because the value of the number always remains exactly the same.

Functions
There is a whole set of bare bones in the AMOS Professional skeleton known as "functions". These are command words that have one thing in common: they all work with numbers in order to give a result.

FREE
function: give the amount of free memory in the variable buffer area
memory=Free

For an example of a function in operation, the FREE function checks how many "bytes" of memory are currently available to hold your variables, and it can be used to make a report, like this:

E> Print "The number of bytes available is:";Free

Now use the FREE function with the SET BUFFER command (which is explained earlier in this Chapter) as follows:

E> Set Buffer 13
   Print "The number of bytes now available is:";Free
Back    Next
05.01.05