- Prizm BASIC: Notes and such for future tutorial
- 03 Jul 2014 07:21:15 pm
- Last edited by tifreak8x on 01 Oct 2014 04:06:42 pm; edited 2 times in total
So, we're finding out that we have little in the way of actual information on BASIC and the command syntaxes and structures for the Prizm.
I've finally found a pdf of the manual ( http://edu.casio.com/products/cg_series/data/fxcg10_20_E.pdf ) that is 601 pages long. However, I'm noticing some issues in forms of syntax, as it makes you take the long way around everything and is overly just confusing. So, I'm going to compile notes on things, and when I have enough information to work with for a section, I'll see about combining it into a useful tutorial.
Lists:
Apparently, storing to a list is slightly different. On the TI calculators, we have the little L character, ʟ. On the Prizm (and guessing other Casio models) you have to do something like this:
{1,2,3}->List 1
You can, however, give it a subname, like this:
{1,2,3}-> List "ABC"
To recall and store data to elements, you access elements like this:
List "ABC"[#]
For loops are interesting.
For 1->F To 10
Locate 1,1,F
Next
That's your basic For loop setup.
If you are wanting to have For loop skip numbers, or jump up by 2 at a time, you'd do
For 1->F To 10 Step 2
Locate 1,1,F
Next
It is extremely important to close all things, like ", }, ] etc. If you do not, you will get a syntax error, and it could send you to the end of the program without really telling you where the error is. I spent 45 minutes tracing a bug that ended up missing a " closing a Locate command out, and it was sending me to the end of the program as a syntax error.
If you want a 'wait for keypress' routine, use
While Getkey=0
WhileEnd
To recall a picture in a program on the fx9750gii and prizm,
From the program editor, press OPTN, F6 twice, then F2.
Conditionals always require this syntax using If:
If <condition>:Then
Do it:EndIf
Unlike the z80 TI, you are required to put a Then and EndIf, if you only have 1 item to do, or a dozen.
More to come as I have it..
I've finally found a pdf of the manual ( http://edu.casio.com/products/cg_series/data/fxcg10_20_E.pdf ) that is 601 pages long. However, I'm noticing some issues in forms of syntax, as it makes you take the long way around everything and is overly just confusing. So, I'm going to compile notes on things, and when I have enough information to work with for a section, I'll see about combining it into a useful tutorial.
Lists:
Apparently, storing to a list is slightly different. On the TI calculators, we have the little L character, ʟ. On the Prizm (and guessing other Casio models) you have to do something like this:
{1,2,3}->List 1
You can, however, give it a subname, like this:
{1,2,3}-> List "ABC"
To recall and store data to elements, you access elements like this:
List "ABC"[#]
For loops are interesting.
For 1->F To 10
Locate 1,1,F
Next
That's your basic For loop setup.
If you are wanting to have For loop skip numbers, or jump up by 2 at a time, you'd do
For 1->F To 10 Step 2
Locate 1,1,F
Next
It is extremely important to close all things, like ", }, ] etc. If you do not, you will get a syntax error, and it could send you to the end of the program without really telling you where the error is. I spent 45 minutes tracing a bug that ended up missing a " closing a Locate command out, and it was sending me to the end of the program as a syntax error.
If you want a 'wait for keypress' routine, use
While Getkey=0
WhileEnd
To recall a picture in a program on the fx9750gii and prizm,
From the program editor, press OPTN, F6 twice, then F2.
Conditionals always require this syntax using If:
If <condition>:Then
Do it:EndIf
Unlike the z80 TI, you are required to put a Then and EndIf, if you only have 1 item to do, or a dozen.
More to come as I have it..