36 lines
486 B
Plaintext
36 lines
486 B
Plaintext
Disp "String:"
|
|
input→A
|
|
length(A)→L
|
|
|
|
.Copy the string to a safe location
|
|
Copy(A,L₁,L)
|
|
|
|
.Display the string
|
|
Disp "You entered:",i
|
|
For(I,0,L-1)
|
|
Disp {L₁+I}►Char
|
|
End
|
|
Disp i
|
|
|
|
Disp "Integer:",i
|
|
input→B
|
|
length(B)→L
|
|
|
|
.Parse the string and convert to an integer
|
|
0→C
|
|
For(I,0,L-1)
|
|
{B+I}-'0'→N
|
|
If N>10
|
|
.Error checking
|
|
Disp "Not a number",i
|
|
Return
|
|
End
|
|
C*10+N→C
|
|
End
|
|
|
|
.Display and check the integer
|
|
Disp "You entered:",i,C►Dec,i
|
|
If C≠7500
|
|
Disp "That isn't 7500"
|
|
End
|