Important: The information in this document is obsolete and should not be used for new development.
LNextCell
You can use theLNextCellfunction 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
LNextCellshould check columns other than the current column.vNext- A Boolean value that indicates whether
LNextCellshould 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 theLNextCellfunction hinges on the values of thehNextandvNextparameters.If
hNextisTRUEandvNextisFALSE, thenLNextCelltries to find a cell whose coordinates are greater than those of the cell specified intheCellparameter but that is in the same row astheCell. If successful,LNextCellsets the value of thetheCellparameter to the first such cell and returnsTRUE. If the cell initially specified bytheCellis the last cell in its row, however,LNextCellreturnsFALSE.If
hNextisFALSEandvNextisTRUE, thenLNextCelltries to find a cell whose coordinates are greater than those of the cell specified intheCellparameter but that is in the same column astheCell. If successful,LNextCellsets the value of thetheCellparameter to the first such cell and returnsTRUE. If, however, the cell initially specified bytheCellis the last cell in its column,LNextCellreturnsFALSE.If both
hNextandvNextareTRUE, thenLNextCelltries to find a cell whose coordinates are greater than those of the cell specified in the parametertheCell. If successful,LNextCellsets the value of thetheCellparameter to the first such cell and returnsTRUE. If, however, the cell initially specified bytheCellis the last cell in the list,LNextCellreturnsFALSE.Finally, if both
hNextandvNextareFALSE,LNextCellsimply returnsFALSE.SPECIAL CONSIDERATIONS
You should not call theLNextCellfunction from within an interrupt, such as in a completion routine or VBL task.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theLNextCellfunction 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.