Amos Professional Manual  Contents  Index

Disc Access


Now try this example:

E> Open Random 1,"ADDRESS"
   Field 1,25 As NAME$,12 As TEL$
   Do
    Input "Enter Record Number: ";INDEX
    If INDEX=0 Then Exit
    Get 1,INDEX
    Print NAME$ : Print TEL$
   Loop
   Close 1
Included files
The AMOS Professional Editor cannot rationalise your source code around the entire memory of the Amiga. This means that if you are editing an extremely long program, the insertion of a line can be tedious. It can take a few seconds to move the memory around before allowing the next line to be inserted.

To assist the editing of lengthy programs in assembly language or C, an Include facility is provided. AMOS Professional programmers can enjoy exactly the same benefit!

INCLUDE
instruction: specify a file for inclusion when testing a program
Include "File_To_Include.AMOS"

The INCLUDE command must occupy a line on its own, otherwise the specified file will not be detected , and so it will not be included. The effect of INCLUDE on a file is as follows:

You will need enough memory to hold the original buffer space and the included files at the same time for this process to operate, but if your program is large enough to slow down the Editor it is obvious that you have access to a reasonable amount of memory.

Please note that included files are only supported in the original source, and an INCLUDE in an included file will generate an error when the program is run. The re-created buffer is erased as soon as the program is left, so the specified files must be loaded every time the program is tested. If programs are included which have memory banks, these banks will be left out.

Back    Next
10.02.16