Jump to content



Photo
- - - - -

Help on Some Basic Stuff


  • Please log in to reply
3 replies to this topic

#1 CaletoFran

CaletoFran

    Newbie

  • Members
  • Pip
  • 2 posts
  • Gender:Male

  • Calculators:
    FX-9750GIII

Posted 04 September 2023 - 05:10 PM

Okay so I am new to Casio Basic so if you lovely people could answer my questions I would have the utmost appreciation for you!!  :)

Before I ask my questions, I believe you should know my calculator is the fx-9750GIII, & I am not a complete beginner so I know most stuff in it, but obviously not all!! Also if you want to test any of these code snippets you can test them here: https://basic.crevola.org/

Now that I have bored you with details here my questions:

  1.  Is there a way to store Video data before it is sent to the screen?
    0->X
    
    While 1
    Text 10,X,"a"
    X+1->X
    WhileEnd
    

    In this example you can see the obvious problem. It simply leaves trail of pixels caused by the fact that the screen isn't cleared when drawing characters onto the screen.
    Okay so let's fix the problem!
     

    0->X
    
    While 1
    Cls
    Text 10,X,"a"
    X+1->X
    WhileEnd
    

    Errr... While, yes technically we have "solved" the problem, As you can see we have another problem. Not something we want while programming. The problem with this solution is we get a flicker which is just unplayable and gets progressively worse the more graphics we display on screen.
    What I am wondering is if there is a way to save graphics to V-RAM or V-RAM Cache before displaying it so I could do something like this:

    0->X
    
    While 1
    [Save stuff to V-RAM or Cache]
    Text 10,X,"a"
    X+1->X
    [Display the stuff in V-RAM or Cache]
    WhileEnd
    

    This of course would override the current screen data? Is this something that is possible or not? Just curious! If not I would like to see any work arounds you may come up with that can still display the current frame while building the next one!
     

  2. Can you set the value of a memory cell(Variable, List Cell, Matrix Cell, etc...) to be that of a String?
     

    "Test"->A
    

    I want to know because I see other people do it but since I can only read it on the Calculator I cannot figure out how they do it!
    My other more important reason is because I want to store Strings in a List for my Inventory System but cannot find out at all for lists!!! :banghead: 
     

  3. Are there any workarounds to the Fact that Casio Basic doesn't support If Else statements?

Thank you for being super patient and reading my lengthy questions! It is quite urgent so if anyone could respond with haste I would absolutely love it, and if not I will still be fine with that too! :nod:  :nod:



#2 Sheepolution

Sheepolution

    Newbie

  • Members
  • Pip
  • 22 posts
  • Gender:Male
  • Location:The Netherlands

  • Calculators:
    CFX-9850GC PLUS

Posted 04 September 2023 - 09:26 PM

1. I'm afraid these are the limitations of Casio Basic. A command draws straight away. In your specific example you could solve it by adding a space before the "a", but that's probably not what you were looking for.

2. Nope. The best solution I came up with is storing text in lists instead. See my Tic Tac Toe code for an example (especially the Libraries section at the bottom) (Thread).

3. Casio Basic does have If Else statements. See page 241 of the manual of your specific calculator.

 

One more tip: ChatGPT is, like with many things, a good tool for getting help with Casio Basic.



#3 CaletoFran

CaletoFran

    Newbie

  • Members
  • Pip
  • 2 posts
  • Gender:Male

  • Calculators:
    FX-9750GIII

Posted 06 September 2023 - 04:25 PM

Thank you for your response as for number three, I most likely worded it incorrectly because I meant If Else
As in:

If X=Y
Then Func
Else If X=Z
Then Func 2
IfEnd

#4 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

  • Calculators:
    Casio Graph 90+E, Casio fx-CG20

Posted 29 September 2023 - 09:39 AM

In such cases, I write "     " at the position of the text first. That does not flicker.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users