i was looking at the AMAZING doors cs7 Very Happy and saw there was even a little mouse cursor you could move around... pretty nice i thought. Cool

so today, during a chemistry lecture i decided to try allitle something... it went like this: Arrow


Code:
:Lbl1
:Clrhome
:ClrDraw
:Text(10,36,"SELECT AN OPTION"
:Text(30,48,"A"
:Text(30,58,"B"
:Text(20,68,"C"
:Text(30,63," "
:Input
:If 10>X and X>1 and 1>Y and Y>-7:Goto 2
:If 20>X and X>10 and 1>Y and Y>-7:Goto 3
:If 30>X and X>20 and 1>Y and Y>--7:Goto 4
:Lbl 2
:Disp "A":Pause :Goto 1
:Lbl 3
:Disp "B":pause :Goto 1
:Lbl 4
:Disp "C":Pause :Goto 1


If anyone has enough time, could you copy this down as a program? im wondering if i can compress it more, make it easier to use maybe, and if i can change that standard littlle '+' sign into an actual computer-lookind arrow/ cursor. Thanks for any help provided! Smile yes or no? useful or not? idk, i need some help i think Good Idea or Bad Idea


Thanks agian, this is an AWSOME resource!!!! TI-84+ SE
Looks nice, I would say make your own movement system, but as a must-have, it needs to be able to accelerate. As in, it starts moving by ones, and then later moves by 2s and 3s etc. Good luck. Besides that though, I didn't have time to print this out on the calc, but a quick overview shows that it is correct. Except: What happens when the cursor isn't on any of the items? It will auto choose the first item.
It is strongly recommended that you not use labels this way. Here's a version that does exactly the same thing as yours, but without the Lbls and Gotos:


Code:
:While 1
:ClrHome
:ClrDraw
:Text(10,36,"SELECT AN OPTION"
:Text(30,48,"A"
:Text(30,58,"B"
:Text(20,68,"C"
:Text(30,63," "
:Input
:If 10>X and X>1 and 1>Y and Y>-7:"A
:If 20>X and X>10 and 1>Y and Y>-7:"B
:If 30>X and X>20 and 1>Y and Y>--7:"C
:Pause Ans
:End


A tool you might not know about to convert text source code like this into .8xp files, called SourceCoder, that I wrote:
http://sc.cemetech.net
yeah ok so i dont ned labels then? huh thats weird ive been doing that for years...
Hey, why do you have "Pause Ans" at the end there. I can follow everything about that code _except_ that. I suppose that's what happens when you've been out of the game for years P:
because it does the same thing as

Code:

Disp Ans
Pause


Sorry, forgot to complete the code tag.
Ohh. And since the string A, B or C being stored in Ans (automatically) it'll display that string upon Pause. Makes sense now.
comicIDIOT wrote:
Ohh. And since the string A, B or C being stored in Ans (automatically) it'll display that string upon Pause. Makes sense now.
Exactly. I could optimize it even more to turn those three If lines into something in the form of:


Code:
:sub("ABC",[something],1


but I'd prefer not to overwhelm rcplanegy, the OP, quite yet.

@Rcplanegy: What do you mean you don't need labels? I'd be happy to clarify exactly when you do and do not need or should or should not use labels.
well by not having labels i thought the only way to specificly display 1 thing was to have a labe and/or a goto command to direct the user to that location, display whatever, then another label to go back to where ever you started :/ i guess i didnt know as much as i thought....
rcplanegy wrote:
well by not having labels i thought the only way to specificly display 1 thing was to have a labe and/or a goto command to direct the user to that location, display whatever, then another label to go back to where ever you started :/ i guess i didnt know as much as i thought....
It's an understandable assumption, but quite wrong, and abandoning it will help you create much faster and smaller programs. 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