CurRow: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(edit)
 
No edit summary
Line 3: Line 3:
===Comments and Examples===
===Comments and Examples===


Please see the [[CurCol]] function for an example use of CurRow.
00100 DIM ALL$*1920
00110 INPUT FIELDS "1,1,c 1920,u": ALL$
00120 PRINT "Cursor ended on ROW"; CURROW
00130 PRINT "Cursor ended on COLUMN"; CURCOL
00140 PRINT "Cursor ended on FIELD"; CURFLD
 
In the sample program above, the entire screen is treated as one 1920-character input field. The operator can move the cursor to any of the 24 rows or any of the 80 columns. After the operator hits the <ENTER> key, line 120 will print the row number containing the cursor when input was ended. Also, line 130 will print the column number. Line 140 will print field 1 because there is only one large field in this example.


===Related Functions===
===Related Functions===

Revision as of 21:33, 23 January 2012

The CURROW internal function returns the cursor's row from last Input Fields or RInput Fields statement.

Comments and Examples

00100 DIM ALL$*1920
00110 INPUT FIELDS "1,1,c 1920,u": ALL$
00120 PRINT "Cursor ended on ROW"; CURROW
00130 PRINT "Cursor ended on COLUMN"; CURCOL
00140 PRINT "Cursor ended on FIELD"; CURFLD

In the sample program above, the entire screen is treated as one 1920-character input field. The operator can move the cursor to any of the 24 rows or any of the 80 columns. After the operator hits the <ENTER> key, line 120 will print the row number containing the cursor when input was ended. Also, line 130 will print the column number. Line 140 will print field 1 because there is only one large field in this example.

Related Functions