Here’s that code as a Menu( command, and then that code as a custom menu:
Code:
If Z=1
Goto B
If Z=2
Goto C
Lbl B
11->Z
Menu("Select a shape.","Triangle",D,"Square",E,"Trapezoid",F,"Circle",G,"Rectangle",H,"Ellipse",I,"Back",A
For the record, uppercase letters are much smaller byte-wise and probably faster.
Custom menu:
Code:
If Z=1
Goto B
If Z=2
Goto C
Lbl B
1->Z
While K<=34
ClrHome
Output(Z,1,">
Output(1,2,"Triangle (1)
// D
Output(2,2,"Square (2)
// E
Output(3,2,"Trapezoid (3)
// F
Output(4,2,"Circle (4)
// G
Output(5,2,"Rectangle (5)
// H
Output(6,2,"Ellipse (6)
// I
Output(7,2,"Back (7)
// A
Repeat Ans
getKey
End
Ans-24->K
// one space v
Output(Z,1,"
Z+(K=1)-(K=10->Z
Z(Z<=7)+7(Z<1->Z
End
K+24->K
If Z=1 or K=92
Goto D
If Z=2 or K=93
Goto E
If Z=3 or K=94
Goto F
If Z=4 or K=82
Goto G
If Z=5 or K=83
Goto H
If Z=6 or K=84
Goto I
If Z=7 or K=85
Goto A
I'm like 99% sure the custom menu works, but I never tested it.