Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Intermec Online Guide - <b>open file command (o)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
OPEN FILE COMMAND (O)

Purpose: Open data file with a specified number of records.

Format:  OX(n,m)

Remarks: O         Open file

         X         File name (A-Z)

         n         Number of records in file X; 0 to (n-1)

         m         Maximum number of characters in each record in file X.

         The Open File Command(s) must be the first statements in a program.
         The size of each file (how many records and maximum number of
         characters per record) is:

         [(m+2) * n] = size of each file.
         2 is added for EOR and LRC characters.

         To determine the memory space used, perform the above calculation
         for each file and then add up all the numbers.  the total cannot
         exceed the device's memory.

         If:                 Compile Error:      And:

         Sum of files        ! NO FILE           Display O command that
         greater than memory MEMORY              caused error

         Open two files      ! DUP. FILE         Display O command that
         with same name      OPEN                caused error

         O command not       ! BAD FILE          Display O command that
         first in program    OPEN                caused error


         Each file is stored in memory as follows:

         String Length ... Data Characters ... LRC

         The LRC is checked when each record is retrieved (the LRC is
         calculated as the exclusive OR of all characters).  If there
         is an error, the device will display the error message:
         LRC Data Error.

Examples:          OA(50,10) opens file A with 50 records (0 to 49).
                   each record has a maximum size of 10 characters.

                   OR(100,35) opens file r with 100 records (0 to 99).
                   Each record has a maximum size of 35 characters.

         NOTE: While most commands may have spaces embedded freely as
         seperators, the Open File command must not have any extraneous
         spaces between the parentheses.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson