Welcome to AE Resources
Converted document
REALS
When formating REAL variables there are several options. REAL numbers can be output using floating point [F], exponential [E], s cientific [ES], and engineering forms [EN].
Floating point Fw.d
The w symbol indicates the number of total spaces to use in displaying a number in simple decimal form. The .d symbol quantifies how many of those positions define the number of significant digits (the numbers to the right of the decimal). The total number of digits to the left of the decimal is computed by subtracting (d + 2) from w, where the  + 2 includes the digits needed for the sign and decimal point. If the size of the d symbol makes it impossible to display all the numbers before the decimal in the limited space specified by w, asterisks will be displayed instead to denote a format overflow.
Exponential Ew.dEe
The w symbol describes how many total positions to use in displaying the REAL number. .d gives the total number of decimal positions to use in the first part of the expression. The exponent reserves at minimum 3 positions. The Ee is optional and is used to dictate how many digits to reserve for the exponent. The symbol w must be equal to or greater than the sum of d and e.
Positioning
Horizontal nX
The symbol nX skips the next n positions. This is true for both READ and WRITE where it will skip the next n digits when reading or skip n spaces when displaying data
Tabbing Tc TLc TRc
Tabbing is used to select positions anywhere in a written display. The T symbol is the symbol that indicates that tabbing is being used. The c symbol tells the compiler how many positions to move. In the case of Tc it specifies a position where the next variable will be displayed. When it is used with an L or R the c tells the compiler to move c positions left or right respectively. If variables overlap while using tabbing symbols the most recent input will override the older one. It will not produce an error.
Vertical /
The slash [/] symbol is used to end a line in the READ or WRITE. This means that if it is used in a READ statement, all or part of the data on multiple lines can be read. If it is used with the WRITE statement then it is similar to pressing “enter” or “return” on a word processor, moving to the next line before continuing to display information.
OTHER FORMATS
Blank Control BN and BZ
The use of blank control variables interprets blanks in the input. BN ignores blanks, while BZ interprets blanks as zeros. Any format strings that follow one of these two format strings will be effected. Any strings that come before will not be affected.
Sign Control S, SP and SS
The use of sign control tells the program whether or not to print the plus sign on numbers. ’S’ tells the system to use the compiler’s default setting (no plus sign). ’SP’ tells the system to print the plus sign every time. ’SS’ tells the system to not print the plus sign. These format strings will only affect the format strings that follow their use.
Grouping r(...)
Grouping is a way of repeating any of the format multiple times. Preceding any of the above formats is the same as typing them r times separated by commas.
Format Scanning Control :
This symbol is used to check if any items have not been formatted. If all the items involved in the READ or WRITE have been used and formatted then the format scanning terminates, saving time and space [in case the code has spacing symbols that could cause unnecessary space use]. If there are more items to format the scanner will move on to the next format symbol.
← Previous Page
← Previous Page