Hi all,

I am wondering if Casio BASIC offers a command that works like Input does in z80 TI-BASIC where it places a cursor on the graph screen.

If no such command exists, then, does anybody have some good ideas for a routine I can write that has similar functionality such as a getkey loop that moves a pixel around on the screen?

Thanks for the help!
Sorry, i don't really understand what you mean (i haven't any z80), but you should try :

Code:
Plot [DISP]

[DISP] is the fill black triangle, [SHIFT] [VARS] [F5].

Then you can know the coordinates in variables X and Y.

You can also add

Code:
CoordOn


Don't forget that it depends of the ViewWindow.
Purobaz wrote:
Sorry, i don't really understand what you mean (i haven't any z80), but you should try :

Code:
Plot [DISP]

[DISP] is the fill black triangle, [SHIFT] [VARS] [F5].

Then you can know the coordinates in variables X and Y.

You can also add

Code:
CoordOn


Don't forget that it depends of the ViewWindow.


Well, in TI-BASIC, the Input command (used without any arguments) 'prompts' a location on the screen(you have control of a cursor, and it stores your X and Y-coordinates when you press enter)

I could give you some pseudocode to make something like that, but be warned: graphscreen on the prizm is notoriously slow Razz


Code:
//loop until enter is pressed
        //check keypresses; increment or decrement X and Y depending on keypress
       //display cursor
//X and Y are now stored in your memory

hope this helps Wink
turiqwalrus wrote:
Well, in TI-BASIC, the Input command (used without any arguments) 'prompts' a location on the screen(you have control of a cursor, and it stores your X and Y-coordinates when you press enter)

I could give you some pseudocode to make something like that, but be warned: graphscreen on the prizm is notoriously slow Razz


Code:
//loop until enter is pressed
        //check keypresses; increment or decrement X and Y depending on keypress
       //display cursor
//X and Y are now stored in your memory


I think my previous answer did this.
A cursor appears, and you can control it.
Purobaz wrote:
I think my previous answer did this.
A cursor appears, and you can control it.


Indeed it does, and it's by far the best way to do it; far better than going out to write one from scratch...

Thanks for sharing that tip! Smile
  
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