Author Topic: Getting started in Casio-Basic? You can ask here.  (Read 72682 times)

0 Members and 1 Guest are viewing this topic.

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #30 on: January 21, 2011, 06:19:35 pm »
No, you cannot use a larger font when in graphics mode.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Getting started in Casio-Basic? You can ask here.
« Reply #31 on: January 22, 2011, 01:00:30 am »
That said, when erasing large portions of the screen, even on a 83+ we used Text( instead of Line(. It was much faster (although we had to use the large fonts for the speed) because it erased 8 lines at once :P

That said, I wonder if graphs can be used in BASIC... if the shading is fast enough, maybe that could be a faster way to draw stuff on the screen? (although it can be harder)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #32 on: January 22, 2011, 01:48:58 am »
Graphs can be drawn, but I haven't experiemented with that yet in basic. There is also something called dynamic graphs which are supposed to move or something. Just from the graph menu I was able to get some interesting color effects not normaly availible in basic. Its also relativily fast. Faster than the 83+.  :D

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #33 on: January 22, 2011, 02:29:51 am »
Wow that looks neat O.O its already becoming apparent that Casio Basic is different in so many ways than Ti Basic, this thread should really help though, everything is already looking really excelent!

Offline Ranman

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1354
  • Rating: +83/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #34 on: January 22, 2011, 02:37:03 am »
I learned how to program Casio BASIC (FX-6300G and FX-7700G) probably 5 years before I bought my first TI graphing calc.
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #35 on: January 22, 2011, 05:38:40 pm »
You can further speed up drawing by using some of the statistics functions: http://www.casiocalc.org/?showtopic=2078

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Getting started in Casio-Basic? You can ask here.
« Reply #36 on: January 24, 2011, 02:21:10 pm »
That's cool. I'll really have to figure out how to actually add shading to my graphs...

@Ranman I got a FX-7000G and 7700GE. The BASIC language on them are similar but the other calc got a bit more RAM. It was the 1st gen BASIC language which has no locate/getkey and graph screen drawing commands. Yet the language gave more freedom than on the TI-Nspire. O.O
« Last Edit: January 24, 2011, 02:22:18 pm by DJ Omnimaga »

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #37 on: January 27, 2011, 01:43:45 am »
Couple of questions regarding basic. First off how do I take user input. Such as numbers and strings. Second is use of matricies and lists. Mostly on referencing a single index in that matrix or list. Last off is drawing with statistics functions. I tried the example code on casiocalc, but I couldn't get it to run.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #38 on: January 27, 2011, 01:51:44 pm »
Quote
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:

Code: [Select]
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...

Quote
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: :D

Code: [Select]
// 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

Quote
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".
« Last Edit: January 27, 2011, 03:31:24 pm by cfxm »

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #39 on: January 27, 2011, 06:11:26 pm »

Question: Does the Prizm's Locate command support color commands (e.g. Green Locate 1,1,...)?

Yes.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #40 on: January 27, 2011, 06:35:33 pm »
Oh, nice.

So you no longer have to write...
Green " "
Locate 1,1,"Green Text"
...as on the CFX models. :)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #41 on: January 27, 2011, 06:36:06 pm »
Nope. There's also almost no difference in speed either.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Getting started in Casio-Basic? You can ask here.
« Reply #42 on: January 27, 2011, 08:08:30 pm »
I'm glad we can use matrices that way on the Prizm. This shall be useful for tilemaps.

Offline bsl

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 157
  • Rating: +14/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #43 on: February 13, 2011, 08:20:20 pm »
Here is a Prizm commands <=> text conversion table.
Works well on the Prizm, except for converting text like @7FF5
It would be nice to get the special symbols off the calculator somehow.
« Last Edit: February 13, 2011, 08:28:53 pm by bsl »

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #44 on: February 13, 2011, 08:24:15 pm »
Oh, yeah. I managed to get all entries in the the special symbols table off of the calc a couple days ago. Here you go. The normal letters are marker symbols so that each line could be easily identified in Text/hex format.

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ