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

0 Members and 1 Guest are viewing this topic.

Offline pokemonrules9

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +2/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #90 on: September 24, 2011, 05:39:52 pm »
try:

Locate 4,4,"some text"
0->K
While K=0
Getkey -> K
If K=79
Then ClrText
WhileEnd
Trying that gave me a syntax error on the last line...  ???

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Getting started in Casio-Basic? You can ask here.
« Reply #91 on: September 24, 2011, 05:50:28 pm »
Code: [Select]
Locate 4,4,"some text"
0->K
While K=0
Getkey -> K
If K=79
Then ClrText
IfEnd
WhileEnd

I forgot IfEnd :P

Here is a really good casio-BASIC tut: http://www.casiocalc.org/index.php?act=findpost&pid=31798
« Last Edit: September 24, 2011, 05:51:27 pm by flyingfisch »



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline pokemonrules9

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +2/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #92 on: September 24, 2011, 05:57:02 pm »
IT WORKED! :D haha. Thank you for answering that simple question  :P

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Getting started in Casio-Basic? You can ask here.
« Reply #93 on: September 24, 2011, 05:59:01 pm »
Your welcome. and be sure to check out that tut.



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Getting started in Casio-Basic? You can ask here.
« Reply #94 on: September 24, 2011, 06:23:57 pm »
That looks almost JUST like TI BASIC!
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Getting started in Casio-Basic? You can ask here.
« Reply #95 on: September 24, 2011, 06:58:37 pm »
they are very similar...



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline sjasogun1

  • LV3 Member (Next: 100)
  • ***
  • Posts: 88
  • Rating: +8/-1
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #96 on: September 29, 2011, 02:49:28 pm »
They are similar, but I really feel TI-BASIC is the better programming language because of the ability to wrap strings around the screen, having the ability to check a certain part of a string (Casio-BASIC would need to extract the symbol from the string, store it into a seperate string and compare it with the comparison string) and the ability to use HEX codes to generate icons. Especially the last function got me jealous of TI-calc owners D: The fastest method of drawing a sprite on CASIO is storing the coordinates of the pixels into two lists and drawing them all using Scatter,List 1,List 2 (also with some other things before and after it I can't remember) and changing the V-Window settings to move the sprite around.
Veni, vidi, cecidi
(I came, I saw, I fell down dead)
MSPAFORUMS: http://www.mspaforums.com/
HOMESTUCK: http://www.mspaintadventures.com/?s=6&p=001901

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #97 on: September 30, 2011, 08:53:52 am »
the ability to use HEX codes to generate icons. Especially the last function got me jealous of TI-calc owners D:
That's not an actual TI-BASIC feature. The program Doors CS makes it work when you open files using it, but in all other cases, you can't have an icon.

Offline m1ac4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +8/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #98 on: September 30, 2011, 09:45:28 am »
They are similar, but I really feel TI-BASIC is the better programming language because of the ability to wrap strings around the screen
You can do that in a complicated fashion with the quotation marks (e.g. "String that is more than 21 characters long").  Just not with Locate.
... having the ability to check a certain part of a string (Casio-BASIC would need to extract the symbol from the string, store it into a seperate string and compare it with the comparison string
That is what StrCmp( is for.  Actually, I'm not quite sure what you mean here.

I find myself more challenged by Casio Basic.  It does seem a little bit more awkward sometimes.
« Last Edit: October 03, 2011, 07:27:47 am by m1ac4 »

Offline sjasogun1

  • LV3 Member (Next: 100)
  • ***
  • Posts: 88
  • Rating: +8/-1
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #99 on: October 06, 2011, 07:54:28 am »
On the casio you have to extract the part of the string you need with StrMid(, assign it to another string and then use StrCmp to compare that one with a "test" string that would contain the character you want to check. It's really obnoxious and slow so I don't use it.
Veni, vidi, cecidi
(I came, I saw, I fell down dead)
MSPAFORUMS: http://www.mspaforums.com/
HOMESTUCK: http://www.mspaintadventures.com/?s=6&p=001901

Offline m1ac4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +8/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #100 on: October 06, 2011, 09:58:00 am »
What I have done several times for such a situation is
Code: [Select]
StrCmp(StrMid(Str #,<index>,<length>),"String")=0Where "String" is whatever I am testing for (either a string # or something like "A").  This would combine all of the steps and run much faster.  It is somewhat of a handful but it works.

Offline pokemonrules9

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +2/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #101 on: October 18, 2011, 10:40:42 pm »
I've been making some simple programs the last few days.  I made a snake game and a few others like that.  Recently, I've been working on more complex programs and have ran out of variables to use.  I tried to use matrices, and they're not really working.  I did what the tutorial said to, and it keeps telling me that i have a syntax error right after i say "Mat".  Could anyone give me an example of how a matrix would look?

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: Getting started in Casio-Basic? You can ask here.
« Reply #102 on: October 19, 2011, 12:53:30 am »
I used to program some casio basic so here i can tell you (ps: it was for a 9850, should also work for 9860
eg for a 4x4 matrix: (EDITTED)  [[0,0,0,1][0,0,1,0][0,1,0,0][1,0,0,0]]-> Mat A
would create the matrix:
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
« Last Edit: October 19, 2011, 08:39:55 am by Jonius7 »
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline m1ac4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +8/-0
    • View Profile
Re: Getting started in Casio-Basic? You can ask here.
« Reply #103 on: October 19, 2011, 07:43:40 am »
There is an additional square bracket at the beginning that is necessary.  In Jonius7's example it would start like [[0,0,0,1][0,0 ...
Also, pokemonrules9 do you know about the variables theta and r?  It took me a while to realize I could use them in programs and having those additional two can be useful.

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: Getting started in Casio-Basic? You can ask here.
« Reply #104 on: October 19, 2011, 08:20:36 am »
There is an additional square bracket at the beginning that is necessary.  In Jonius7's example it would start like [[0,0,0,1][0,0 ...
Also, pokemonrules9 do you know about the variables theta and r?  It took me a while to realize I could use them in programs and having those additional two can be useful.
Oh yes, i've forgotten about that. I've forgotten quite a lot of casio basic i once knew.
The way I learned Casio BASIC was to look at other people's games. I would download the cat file for 9850 and  open it in a word document. the code to type was readable. and i had to type it manually anyway, as i had no link cable. So when I typed Sean Tan's Star Wars game (about 20000 bytes) I managed to reduced it by 4000 bytes or so by using a list instead of a one column matrix.
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)