Omnimaga
Calculator Community => TI Calculators => General Calculator Help => Topic started by: Yeong on February 20, 2012, 09:29:36 pm
-
ok. Many people got their Prizm through the CASIO event and I assume that many people are willing to try to program. :D
However, Casio Basic and Ti Basic are different. D:
So, I decided to write a really simple (not complicated) "conversion table" from TI-BASIC to Prizm BASIC! :D
1. Input/Output
TI-BASIC
Input Stuff
Input "DISPLAY", Stuff
Output(row,column,"DISPLAY")
Disp "CONTENT"
to Prizm BASIC
?→Stuff
"DISPLAY"?→Stuff
(Color) Locate column,row,"DISPLAY"
"CONTENT"
Also, I think it's a good idea to mention that while TI-84+SE has 16x8 homescreen available to use for program, Prizm has 21x7 homescreen available to use for program. Yes. One less row. D:
At least, Locate can have color stuff XD Oh. Color can be accessed by [SHIFT] [5] [5] [1] in program editor.
2. Loops
TI-BASIC
:If Condition
:Then
:Code
:Else
:Another Code
:End
For(Variable,Start_Num,End_Num(,Increment value))
:Stuffs
:End
While Condition:Code:End
Repeat Condition:Code:End
to Prizm BASIC
If Condition
:Then
:Code
:Else
:Another Code
:IfEnd
For Start_Num→Variable To End_Num(Step Increment Value)
:Stuffs
:Next
While Condition:Code: WhileEnd
Do:Code:LpWhile Condition
It's worthy to mention that in Prizm BASIC, "Then" is must be used in If statement.
Also, Do-LpWhile loop loops until the condition is true, unlike Repeat!
3. =>
=> is really awesome to use! :D
=> is called "Jump condition" iirc, and its syntax is this:
Condition=>Condition if true[:Condition of false]
It's kinda like ? function in axe. Kinda.
So instead of all this jarble:
If A=3
Goto 1
Else
Goto 2
IfEnd
You can do this!
A=3=>Goto 1:Goto 2
=> can be found in [shift] [vars] [f3] [f3].
4. Strings
TI BASIC
sub(Str1,Start_from,how_many_chars)
to Prizm BASIC
StrMid(Str 1,Start_from,how_many_chars)
I'll add more later. :D
-
Yeah it's kind of weird that you can't get at the bottom row, I guess it's because of the program inadvertently scrolling the screen or something.
I'm wondering if there's a kind of catalog help for the Prizm anywhere, I just looked around (including the official thingy at casio's site) and didn't see any :/
-
The only place I could think of is the Prizm manual(Hard to find some stuffs XP ) and cemetech prizm wiki which has 100+ commands documented so far.
-
The bottom row was actually reserved for the menus. It kinda sucks though because it makes porting 83+/86 games even more of an hassle.
By the way I think Qwerty.55 was working on a similar tutorial before, it might be somewhere on the forums. However he stopped.
-
Thanks TBO_Yeong! I got my calculator today and started playing around with programs immediately. This is a really useful topic. (I'd rate you up but I can't from where I am D:)
-
I forgot to add the color in Locate and Else. XD
Just added them.
-
By the way, you know you can use [hr] to draw horizontal lines:
So you don't have to use [spoiler][/spoiler].
-
THAT was what I was looking for XD
Thanks
-
updated for => stuff.
I think this should go to tutorial eventually... :D
-
With the => do you have to use goto's? Or could you simply tell it to do something like Locate blahblablah?
-
For the Disp Command you just showed text in quotes but this wont work for variables all the time(It at least didnt work in my program but that may be my fault)
Also istn there some strange triangle thing for Disp then pause?
-
I know how to display, I was just asking about the => command. Also yes the triangle thing will act as a pause in most cases
-
Oh I wasnt responding to yours saintrunner and I think that the => command should work with anything I'll test it on calc in a minute
-
Looks nice so far Yeong. When it reaches more progress, you should put it in the tutorials section with a link to this thread. :D
-
Looks nice so far Yeong. When it reaches more progress, you should put it in the tutorials section with a link to this thread. :D
we'd need a prizm-basic section, though... we only have prizm-C and prizm-general
Also, I'd be happy to help a bit with these tutorials, Yeong :D
-
With the => do you have to use goto's? Or could you simply tell it to do something like Locate blahblablah?
it can be any line. ;)
-
What is the PRIZM Basic equivalent to "Repeat" in TI-Basic?
-
What is the PRIZM Basic equivalent to "Repeat" in TI-Basic?
TI-Basic:
Repeat A
Prizm Basic:
While A=0
or:
While Not(A)
(in other words, there isn't a "Repeat" token in Prizm Basic. ;))
-
:Repeat pxl-Test(Ans,B)=2
How would I do this?
-
:Repeat pxl-Test(Ans,B)=2
How would I do this?
Well, first of all, pxl-Test returns either a 1 or a 0, so that loop would go forever. :P
If you wanted to do something like:
Repeat pxl-Test(Ans,B)=1 (which is the same as doing Repeat pxl-Test(Ans,B))
Then in Casio Basic, the code would look like this:
While pxl-Test(Ans,B)=0
-
What would happen if it equaled 2(the casio one)? Nevermind......
-
While pxl-Test(Ans,B)=/=2
EdIt: 1one1one p0st.
-
What is the PRIZM Basic equivalent to "Repeat" in TI-Basic?
I'm pretty sure I mentioned the alternative to Repeat Loop... O.o
-
If you mean a loop that checks at the end instead of at the beginning, use Do/LpWhile.
EDIT: It's all in the first post as Yeong said.
-
AWSOME. *.* just what I wanted. :w00t: