Pos Parameter: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
POS <number>
The POS parameter is used to specify the location on the screen, printer, or file where the cursor appears. 
01100 form pos 18
See also [[POS]] internal function.
===Use with READ===
===Use with READ===
In [[Read file]] statements, the optional "POS=num-expr" clause is used only with external files opened for RELATIVE processing; its purpose is to position to a specified byte before reading. After the numeric expression (usually a simple numeric variable or constant) is evaluated and rounded to an integer, the system reads a complete record beginning at the specified byte number. If "POS = num-expr" is not specified, the system sequentially reads the next complete record after the last byte read.
In [[Read file]] and [[Restore File]] statements, the optional "POS=num-expr" clause is used only with external files opened for RELATIVE processing; its purpose is to position to a specified byte before reading. After the numeric expression (usually a simple numeric variable or constant) is evaluated and rounded to an integer, the system reads a complete record beginning at the specified byte number. If "POS = num-expr" is not specified, the system sequentially reads the next complete record after the last byte read.


===Use with FORM===
===Use with FORM===
Line 9: Line 16:


POS is also used while printing to a printer or window.  
POS is also used while printing to a printer or window.  
==Use with WRITE===
The "POS=num-expr" clause is only used with [[WRITE]] for external files opened for RELATIVE processing; its purpose is to position to a specified byte before writing. After the numeric expression is evaluated and rounded to an integer, the system attempts to write a complete record beginning at the specified byte number. The only valid value for POS is the first byte after the end of the file.


<noinclude>
<noinclude>
[[Category:All Parameters]]
[[Category:All Parameters]]
</noinclude>
</noinclude>

Latest revision as of 15:33, 8 May 2014

POS <number>

The POS parameter is used to specify the location on the screen, printer, or file where the cursor appears.

01100 form pos 18

See also POS internal function.

Use with READ

In Read file and Restore File statements, the optional "POS=num-expr" clause is used only with external files opened for RELATIVE processing; its purpose is to position to a specified byte before reading. After the numeric expression (usually a simple numeric variable or constant) is evaluated and rounded to an integer, the system reads a complete record beginning at the specified byte number. If "POS = num-expr" is not specified, the system sequentially reads the next complete record after the last byte read.

Use with FORM

In FORM statements, the POS parameter refers to a position on the screen by column. POS is followed by a space and then any integer or numeric variable. The following example will print the name "Camilla" starting at column 60:

00100 Print using nameform: "Camilla"
00110 nameform: form pos 60, c 15

POS is also used while printing to a printer or window.

Use with WRITE=

The "POS=num-expr" clause is only used with WRITE for external files opened for RELATIVE processing; its purpose is to position to a specified byte before writing. After the numeric expression is evaluated and rounded to an integer, the system attempts to write a complete record beginning at the specified byte number. The only valid value for POS is the first byte after the end of the file.