Important: The information in this document is obsolete and should not be used for new development.
LNextCell
You can use theLNextCell
function to find the next cell in a given row, in a given column, or in an entire list.
FUNCTION LNextCell (hNext: Boolean; vNext: Boolean; VAR theCell: Cell; lHandle: ListHandle) : Boolean;
hNext
- A Boolean value that indicates whether
LNextCell
should check columns other than the current column.vNext
- A Boolean value that indicates whether
LNextCell
should check rows other than the current row.theCell
- The coordinates of the current cell.
lHandle
- The list in which to find the next cell.
DESCRIPTION
The behavior of theLNextCell
function hinges on the values of thehNext
andvNext
parameters.If
hNext
isTRUE
andvNext
isFALSE
, thenLNextCell
tries to find a cell whose coordinates are greater than those of the cell specified intheCell
parameter but that is in the same row astheCell
. If successful,LNextCell
sets the value of thetheCell
parameter to the first such cell and returnsTRUE
. If the cell initially specified bytheCell
is the last cell in its row, however,LNextCell
returnsFALSE
.If
hNext
isFALSE
andvNext
isTRUE
, thenLNextCell
tries to find a cell whose coordinates are greater than those of the cell specified intheCell
parameter but that is in the same column astheCell
. If successful,LNextCell
sets the value of thetheCell
parameter to the first such cell and returnsTRUE
. If, however, the cell initially specified bytheCell
is the last cell in its column,LNextCell
returnsFALSE
.If both
hNext
andvNext
areTRUE
, thenLNextCell
tries to find a cell whose coordinates are greater than those of the cell specified in the parametertheCell
. If successful,LNextCell
sets the value of thetheCell
parameter to the first such cell and returnsTRUE
. If, however, the cell initially specified bytheCell
is the last cell in the list,LNextCell
returnsFALSE
.Finally, if both
hNext
andvNext
areFALSE
,LNextCell
simply returnsFALSE
.SPECIAL CONSIDERATIONS
You should not call theLNextCell
function from within an interrupt, such as in a completion routine or VBL task.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theLNextCell
function are
Trap macro Selector _Pack0 $0048 SEE ALSO
Listing 4-7 on page 4-25 and Listing 4-8 on page 4-26 show how to find the first and last selected cell in a list.