1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 07:25:53 +00:00
QB64-PE/internal/help/CSRLIN.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

46 lines
1.4 KiB
Plaintext

The '''CSRLIN''' function returns the current text row position of the [[PRINT]] cursor.
::::::::{{PageSyntax}} row% = CSRLIN
{{PageDescription}}
* The value returned is within the range of 1 to the current number of rows in the [[SCREEN]] mode used.
* In screen modes that support page flipping, the [[CSRLIN]] function returns the vertical coordinate of the cursor on the active page.
* x = [[POS]](0) returns the column location of the cursor.
''Example:'' A semicolon stops the print cursor immediately after the print.
{{CodeStart}} '' ''
LOCATE 5, 5: PRINT &quot;HELLO &quot;;
Y = {{Cl|CSRLIN}} 'save the row
X = {{Cl|POS}}(0) 'save the column
LOCATE 10, 10: PRINT &quot;WORLD&quot;
LOCATE Y, X 'restore saved position
PRINT &quot;GOODBYE&quot; '' ''
{{CodeEnd}}
{{OutputStart}}
HELLO GOODBYE
WORLD
{{OutputEnd}}
:''Explanation:'' &quot;HELLO &quot; is printed and the semicolon stops the cursor immediately after the text. The '''CSRLIN''' variable records the current print cursor's text row in Y. The [[POS]] function records the current print cursor's text column in X. The second [[PRINT]] statement displays the comment &quot;WORLD&quot; on the 10th line of the screen. The last [[LOCATE]] statement restores the position of the cursor to the original line and column immediately after the first print.
''See also:''
* [[SCREEN]], [[LOCATE]], [[POS]]
* [[_PRINTSTRING]] (graphic print)
{{PageNavigation}}