Hello everyone,
New to the forum seen and looking for some assistance.
So I recently found my old TI-83 Plus (currently running 1.14) and decided to give programming a try again (was into it way back in high-school). Unfortunately I have not retained a lot of the knowledge i once had. I wrote a simple program to store and display up to 10 sets of numbers and allow the user to cycle through them and add or clear. However with my limited know how I'm sure there is a much better and more efficient way of getting the same results. Also every now and then I get a memory error. If anyone could review the code and give some insight i would appreciate it.
I don't see a way to add attachment so i will have to past it all in sorry.
Also i need a program clean up command or something at the end to clear everything but the lists
Thank you in advance for any feedback.
PROGRAM: IJK
Code:
New to the forum seen and looking for some assistance.
So I recently found my old TI-83 Plus (currently running 1.14) and decided to give programming a try again (was into it way back in high-school). Unfortunately I have not retained a lot of the knowledge i once had. I wrote a simple program to store and display up to 10 sets of numbers and allow the user to cycle through them and add or clear. However with my limited know how I'm sure there is a much better and more efficient way of getting the same results. Also every now and then I get a memory error. If anyone could review the code and give some insight i would appreciate it.
I don't see a way to add attachment so i will have to past it all in sorry.
Also i need a program clean up command or something at the end to clear everything but the lists
Thank you in advance for any feedback.
PROGRAM: IJK
Code:
ClrHome
ClrDraw
Text(20,30,"WELCOME!"
" "→Str1
" "→Str2
SetUpEditor ∟ARCS
If not(dim(∟ARCS
120→dim(∟ARCS
SetUpEditor ∟TRAC
If not(dim(∟TRAC
2→dim(∟TRAC
Pause
ClrDraw
Goto D
End
Lbl D
If ∟TRAC(1)=0
Then
∟TRAC(1)+1→∟TRAC(1)
Else
ClrDraw
RecallPic 1
Goto MP
End
Lbl MM
Text(0,81,Str1
Text(2,6,Str1
Text(2,37,Str1
Text(11,10,Str1
Text(11,64,Str1
Text(20,10,Str1
Text(20,64,Str1
Text(29,10,Str1
Text(29,64,Str1
Text(38,10,Str1
Text(38,64,Str1
Text(47,6,Str1
Text(47,60,Str1
Goto MP
End
Lbl MP
Text(0,81,∟TRAC(1)
Text(2,6,∟ARCS(∟TRAC(1)12-11
Text(2,37,∟ARCS(∟TRAC(1)12-10
Text(11,10,∟ARCS(∟TRAC(1)12-9
Text(11,64,∟ARCS(∟TRAC(1)12-8
Text(20,10,∟ARCS(∟TRAC(1)12-7
Text(20,64,∟ARCS(∟TRAC(1)12-6
Text(29,10,∟ARCS(∟TRAC(1)12-5
Text(29,64,∟ARCS(∟TRAC(1)12-4
Text(38,10,∟ARCS(∟TRAC(1)12-3
Text(38,64,∟ARCS(∟TRAC(1)12-2
Text(47,6,∟ARCS(∟TRAC(1)12-1
Text(47,60,∟ARCS(∟TRAC(1)12-0
Goto AA
End
Lbl AA
getKey→K
If K=11 and ∟TRAC(1)>1
Then
∟TRAC(1)-1→∟TRAC(1)
Goto MM
Else
If K=12
Then
Goto CL
Else
If K=13
Then
Goto M
Else
If K=14
Then
Goto N
Else
If K=15 and ∟TRAC(1)<10
Then
∟TRAC(1)+1→∟TRAC(1)
Goto MM
Else
Goto AA
End
Lbl CL
0→∟ARCS(∟TRAC(1)12-11
0→∟ARCS(∟TRAC(1)12-10
0→∟ARCS(∟TRAC(1)12-9
0→∟ARCS(∟TRAC(1)12-8
0→∟ARCS(∟TRAC(1)12-7
0→∟ARCS(∟TRAC(1)12-6
0→∟ARCS(∟TRAC(1)12-5
0→∟ARCS(∟TRAC(1)12-4
0→∟ARCS(∟TRAC(1)12-3
0→∟ARCS(∟TRAC(1)12-2
0→∟ARCS(∟TRAC(1)12-1
0→∟ARCS(∟TRAC(1)12-0
Goto MM
End
Lbl M
ClrHome
Menu("MENU","BACK",MP,"GOTO",S,"INFO",I,"QUIT",Q
End
Lbl S
Disp "ENTER 1-10"
Input "NO.",S
If S≥1 and S≤10
Then
S→∟TRAC(1)
Goto MM
Else
Goto S
End
Lbl I
ClrHome
ClrDraw
RecallPic 2
Pause
Goto M
End
Lbl N
ClrHome
If ∟ARCS(∟TRAC(1)12-11<0 or ∟ARCS(∟TRAC(1)12-11>0
Then
Goto NM
Else
Goto NY
End
Lbl NM
Menu("OVERWRIGHT","NO",NN,"YES",NY
End
Lbl NO
Goto MP
End
Lbl NY
ClrHome
Menu("OD OR ID","OD",OD,"ID",ID
End
Lbl OD
1→∟TRACK(2)
Goto NI
End
Lbl ID
0→∟TRAC(2)
Goto NI
End
Lbl NI
Disp "ARC RADIUS"
Input "R: ",R
Disp "TOOL RADIUS"
Input "TR: ",O
ClrHome
Disp "ARC CENTER"
Input "XC: ",U
Input "YC: ",V
Disp "ARC STARTING ANGLE"
Input "A1: ",A
Disp "ARC ENDING ANGLE"
Input "A2: ",B
ClrHome
Output(5,3,"CALCULATING"
If ∟TRAC(2)=0
Then
R-(O*2)→Q
Else
If ∟TRAC(2)=1
Then
R+(O*2)→Q
Goto CA
End
Lbl CA
R→∟ARCS(∟TRAC(1)12-11
O→∟ARCS(∟TRAC(1)12-10
U→∟ARCS(∟TRAC(1)12-9
V→∟ARCS(∟TRAC(1)12-8
A→∟ARCS(∟TRAC(1)12-7
B→∟ARCS(∟TRAC(1)12-6
U+(Q*cos(A°))→W
W→∟ARCS(∟TRAC(1)12-5
V+(Q*sin(A°))→X
X→∟ARCS(∟TRAC(1)12-4
U+(Q*cos(B°))→Y
Y→∟ARCS(∟TRAC(1)12-3
V+(Q*sin(B°))→Z
Z→∟ARCS(∟TRAC(1)12-2
U-W→∟ARCS(∟TRAC(1)12-1
V-X→∟ARCS(∟TRAC(1)12-0
4→T
prgmZDELAY
ClrHome
Goto MM
End
Lbl Q
ClrHome
ClrDraw
Text(22,27,"COME AGAIN!"
2→T
prgmZDELAY
ClrHome
ClrDraw
Stop