I think that Select and Case will work:
DG=Dark Grey number
LSD = Line Start Display
MNV = Max Number of Variables
Select case DG
Case is < 4
LSD = 1 : GOSUB Display
Case is 4 to MNV - 1 'MNV calculated or hard coded. Only first 3 and last one are special cases.
LSD = DG - 2 : GOSUB Display
Case = MNV
LSD = MNV - 3: GOSUB Display
End select
Display:
For LP = LSD to LSD + 3
DIPLAY LINE LP
NEXT LP
Return




Bookmarks