First off how do I take user input. Such as numbers and strings.
?->A // or "A="?->A
?->A~Z // assign to all variables (except r and theta)
?->Str 1 // input a string
?->List 1 // input a list (use "List ?" or "{?,?,?,...}")
?->Mat A // input a matrix (use "Mat ?" or "[[?,?,...][?,?,...]...]")
There is no way to convert an integer to a string...
Combine '?' and 'Locate':
" " // can be preceded by color commands
Locate 1,1,"Personal Settings:"
"Name="?->Str 1
Question: Does the Prizm's Locate command support color commands (e.g. Green Locate 1,1,...)?
You don't like the '?' command?
Here is a small shell-like program:
ClrText
"_ "->Str 1
Locate 1,1,">> _"
Do:While Getkey // wait for key release
WhileEnd
Do:Getkey // wait for key press
LpWhile Not Ans
StrLeft(Str 1,StrLen(Str 1)-2)->Str 1 // remove underscore
Ans=44=>StrLen(Str 1)=>StrLeft(Str 1,StrLen(Str 1)-1)->Str 1 // [DEL]
Ans=61=>Str 1+" "->Str 1 // [.]
Ans=76=>Str 1+"A"->Str 1 // [X,theta,T]
Ans=66=>Str 1+"B"->Str 1 // [log]
...
Str 1+"_ "->Str 1
Locate 4,1,StrRight(Str 1,19)
LpWhile Ans=/=31 And StrLen(Str 1)<255 // [EXE]
StrLeft(Str 1,StrLen(Str 1)-2)->Str 1 // remove underscore
Prog "PARSE" // start parsing...
Second is use of matricies and lists. Mostly on referencing a single index in that matrix or list.
{2,2}->Dim Mat A // or [[1,2][3,4]]->Mat A
3->Dim List 1 // or {1,2,3}->List 1
1->Mat A[1,1]
2->Mat A[1,2]
3->Mat A[2,1]
4->Mat A[2,2]
1->List 1[1]
2->List 1[2]
3->List 1[3]
4->List 1[4] // works too!
5->List 1[5] // works when List 1[4] exists!
...
You can also use variables:
1->I
2->List I[2]
Or even strings:
"NICE"->List 1[0] // the so called 'subject name' of a list
2->List "NICE"[2]
List 1[0]->Str 1
3->List Str 1[3]
Unfortunately, neither do string commands work with variables (e.g. Str I) nor does "?->List 1[0]" work.
Workaround for the last one:
?->Str 1
Str 1->List 1[0]
Btw, there is a way to check for empty lists:
// EXPECT_SIZE... expected list size (>1)
// MAGIC_NUMBER... some special value
EXPECT_SIZE->List 1[1]
If Dim List 1=/=List 1[1]
Then "Data not found!"
Else If List 1[List 1[1]]=/=MAGIC_NUMBER
Then "Data corrupted!"
Else "Data loaded!"
IfEnd:IfEnd
Last off is drawing with statistics functions. I tried the example code on casiocalc, but I couldn't get it to run.
I have never used this technique, but the program seems to work for me.
However, there are two small bugs:
(1) Change "Ans=28=>B-10->B" to "Ans=28=>B+10->B"
(2) Add "AxesOff" somewhere at the top
And I also don't like Gotos:
So replace "Lbl 0:Getkey:Ans=0=>Goto 0" with "Do:Do:Getkey:LpWhile Not Ans" and "Goto 0" at the bottom with "LpWhile 1".