Don't forget about Tokens, http://merthsoft.com/Tokens.zip , which was made by our own Admin, Merth. You can write programs there and save them as 8xp for the calculator.
I do store in source coder but had no way of working on them when at school, which is mostly when I code( as I have a lot of time between classes). And I never heard of that emulate, just what I was looking for. What I was looking for was an easier way to program in basic on the calc itself, something progeammer friendly so it can copy paste as well as lock program and whatnot. I guess I get dors just for that last feature. Anybody know of a way to speed up programming in basic when needing code again and again without retyping? I guess what I envisioned was a program running in the background or a shell or whatever that when a pair of keys like alpha and something, the calc stores into a list and then pastes it. Sound like nothing such exists. Yet...
If you want the same piece of code again and again, and you don't want to call a subprogram via prgmBLAH, then store the code you want to paste repeatedly in prgmWHATEVER. Whenever you want to paste it in the program you're editing, do 2nd-STO (aka RCL), and go to PRGM->prgmWHATEVER, enter, enter. That will paste the contents of prgmWHATEVER into your program.
I wasn't talking about the exact code over and over but like this (this is some java because I don't know how to explain it in other terms):
Button = new JButton ("1")
Button2 = new JButton ("2")
Button3 = new JButton ("3")
...
How could I type a line of code in my calc and then copy it and past if I wanted to change one small detail each time? I get the subprogram idea but that is if the cide is an exact repeat. I want to do the same function, essentially, but with a small change each time I paste. On the computer you copy, paste, then go and change that small detail. Is there a way to achieve a summilar idea on the calc?
Well, if you're repeating something very similar again and again, you're probably doing something that should be a single, more flexible line of code. Can you give us a more concrete example from your TI-BASIC code?
I should state that this is talking about my virus scanner fun project in particular but could be applied to many projects.

Like say I want to display text for my progress bar, I have a few options. One- use lbls and go tos and create a new lbl for each progress screen. In this example, there is the same code repeated many rimes with a small change. Typing it over and over would be painful. Copy and paste required. Two- use various for commands and variables to be used int display command, such as saying " progress is at 'x' percent". Then every so many cycles changing the x variable. The only problem with this is that the textmit broken up into many lines on the display because the variable can't be displayed on the same line as the text. It also gets much more difficult as tou add more feature such as multiple progress bars. Three- create a new solution for displaying the text "scanning for viruses. X percent complete. (visual progress bar)." create the code and tell me... Four- I could use draw and whatnots to use the pixels and create actual screens with every single change for progress. The problem is that drawing is complex to program(for me at least) and takes a lot of time to program. It seems like the most complicated idea.
Let me answer with code:


Code:
ClrHome
Output(7,1,"[
Output(7,16,"]
Output(8,1,"DONE:
Output(8,11,"PCT
For(X,1,100
rand(20 [this is just a brief delay]
Output(8,7,X
Output(7,1+round(X/7),"=
End
Cmpletely forgot about outputs. Can you elaborate on the rand( function?
rand(20 makes a random integer between 1 and 20 and is stored into Ans. As that takes some time for the calc it pauses briefly.
Sorunome wrote:
rand(20 makes a random integer between 1 and 20 and is stored into Ans. As that takes some time for the calc it pauses briefly.
Close, but not quite. That's randInt(1,20). rand(20) generates a 20-element list of numbers between 0 and 1. And indeed, the larger the number, (for example, rand(50) creates a 50-element list of random numbers), the longer it takes to generate. rand(20) is roughly half the delay of rand(40), for example. The only downside is that it trashes Ans, so if you're using Ans, you can't use that trick.
Rand(20 is half as slow as rand(40, but tell me this, in time, how fast is rand(40 for the sake of knowing how long the delay is?
It varies by calculator. I'd also reason that it would vary based on what was last in Ans. For instance, if Ans was a 999 element list, rand(20 would have to delete that list and then create a new one. FWIW, if you were using Ans, you could try some trick like:
Code:
:If Not(Len(Rand(20:
Sadly, it is pretty much guess-and-check on the speed.
I don't think you mean it have the If there. Smile Although I guess you could do If dim(rand(20:Ans to preserve Ans.
No, I meant to have the If there, so that it wouldn't store the Rand(20 in Answer (also, woops, Length( not Len(. Freaking QBasic x.x).
Actually, it's dim( Razz
Bah humbug!
I Agree. BAH HUMBUG. Getting in the christmas spirit already and its not even october . Lol.
calc84maniac wrote:
Actually, it's dim( Razz
That's totally what I had. Wink Catherine, indeed, I figured that, but you'd still need a condition, no?
I have a condition, don't I? The extra colon at the end is so that the If statement has something to execute if it happens to be true (which it will never be).
_player1537 wrote:
I have a condition, don't I? The extra colon at the end is so that the If statement has something to execute if it happens to be true (which it will never be).
Don't you need to have a non-blank statement there? I never considered that a blank statement would count. Shock
  
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 2 of 3
» 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