Hi all,

just found this forum, just registered, first post ever.
I hope it‘s okay to ask a rather simple CASIO Basic question because I saw so many advanced questions of all you guys who write apps in C with an SDK (that‘ll come later for me, I guess).

So, I‘m quite new to the CG50, got it a few days ago. I‘m porting a program I wrote for the fx-5800p.

Here‘s the problem: I want to use the input function ? together with a string (like „Start number?“) but I have written some initial text already on the screen in line 1 and 2 with the Locate command.
So I want the ? command to write the input string and the question mark on line 3 of the display.
However, it always gets written in line 1 and thus overwrites my text I put there in advance.

Is there a way to control where on the screen the „text“?->N input command writes its text?
Or a workaround to make it write the prompt at a line I want it to have?
Is there some kind of „text cursor“ I can manipulate?

Thanks so much guys!
I don't recall any real way of doing that beyond writing up yourself a getkey loop.

You can get some basic getkey values from this little program:

1->W
While W=1
Getkey->K
If K>0:Then
Locate 1,1,L
IfEnd
WhileEnd

From there, you can display values based off key presses, display them where you want, and store them as a variable to manipulate how you want.
tifreak8x wrote:
I don't recall any real way of doing that beyond writing up yourself a getkey loop.

You can get some basic getkey values from this little program:

1->W
While W=1
Getkey->K
If K>0:Then
Locate 1,1,L
IfEnd
WhileEnd

From there, you can display values based off key presses, display them where you want, and store them as a variable to manipulate how you want.


Oh, I see, so the ? command always puts the ? (or string plus ?) at row 1, column 1, right?
What a bad implementation by Casio! 👎

So I have to implement all the checking of correct/bad character by myself. 😞

But thanks so much, tifreak8x, for answering me at all and so quickly! Much appreciated! 👍

Does C.Basic has such an option? Haven‘t checked yet. Will do.
Ohhh, look what I found:
https://egadget.blog.fc2.com/blog-entry-468.html

This is the solution! Turns out, you actually CAN manipulate the internal cursor (row) that‘s used by Casio Basic for the ? command!

Works like a charm! 😊
That's awesome! I never spend a massive amount of time with Casio BASIC, most of my time was with the TI series. I did build a few games and programs for the Casio, so I have a decent understanding, but it's always good to learn more! Good find!
Yes the cursor moves after the "" command. Note however that there is still some rows being cleared, so you can't necessarily Locate things, then move the cursor with "", and the input with ?, as the ? will clear some area of the screen (I don't remember which rows exactly).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement