More Questions Regarding Scrolling, replacing variables, etc.by Nightmare (no login)
-How to make the SLEEP command pause less then a one second, or do I have to use another command for that?
-How to make it so you can scroll up and down in the output screen.
-How to limit the amount of numbers or characters you can type in?
-Why can't I put variables into the COLOR command like: COLOR first%, second%
but I could put variables into the LOCATE command like: LOCATE first%, second%
-How to clear, replace or change previous lines, words or variables?
Like for example:
PRINT "How are you?";
INPUT "", badGood$
IF badGood$ = "good" THEN
'Should change the color of you the second line ("How are you?") to the color red.
PRINT "Too bad"
How can you accomplish something like this?
Or is there a way to make it so when a variable changes (no matter where it is located, it changes everywhere including places where its been used before.
-What's the point of Error Traps? Whenever you make an error in qbasic after you run the program it shows you the line that is causing the problem.
-What's faster, arrays like guy(3), or seperate variables like guy1, guy2, guy3?
-How to allow multiple variables after an INPUT command on one line, for example:
again% = 1
DO WHILE again% = 1
INPUT "", firstNumber%
INPUT "", operator$
INPUT "", secondNumber%
IF operator$ = "+" THEN
total% = firstNumber% + secondNumber%
ELSEIF operator$ = "-" THEN
total% = firstNumber% - secondNumber%
ELSEIF operator$ = "*" THEN
total% = firstNumber% * secondNumber%
ELSEIF operator$ = "/" THEN
total% = firstNumber% / secondNumber%
INPUT "Again? (y/n)"; more$
IF more$ = "y" THEN
again% = 1
again% = 0
Now lets say instead of the output being something like:
I need it to be:
5 + 3 = 8
The Problem is I can't have the semicolon at the end of variables after an INPUT command:
INPUT firstNumber%; symbol%; secondNumber%;
|Response Title||Author and Date|
|Re: More Questions Regarding Scrolling, replacing variables, etc.||on Nov 16|
|Shorter Than Seconds xD||on Nov 18|
|* MILLISECONDS? IMPOSSIBLE! TIME$ changes once a second!||Clippy on Nov 18|
|its the empty for loop||` on Nov 18|
|It works||on Nov 18|
|* Ever hear of TIMER? You have the problem!||Clippy on Nov 19|
|Elaborate||on Nov 19|
|* NOPE, you apparently know TOO MUCH ALREADY!||Clippy on Nov 19|
|Attitude much?||on Nov 19|
|* Don't feel bad. I mistook YOU for a programmer, :-O||Clippy on Nov 19|
|It's an easy mistake to make.||on Nov 19|
|Don't mind Clippy...||Pete on Nov 19|
|I'm not here to push anybody out ;)||on Nov 19|
|OK, if you INSIST!||on Nov 20|
|IC||on Nov 20|
|SNOOZE does work...||on Nov 20|
|Don't mind Pete. He SELLS his code!||Clippy on Nov 20|
|I'm running Mac||on Nov 20|
|I think it should be pointed out that Minty's concept is valid...||on Nov 20|
|Bob, post the code that YOU are using. It doesn't work the way I have it!||Clippy on Nov 20|
|I just used Minty's code, except...||on Nov 20|
|Try this code Bob. I even get the right loop counts, but no delay.||Clippy on Nov 20|
|I assume you're running it in QB64...||on Nov 20|
|Alright, I added one line of code -- try this in QB64...||on Nov 20|
|It works BETTER in QB64 than Qbasic on my XP.||Clippy on Nov 20|
|*Yeah, in QB/DOSBox loops are slo-o-ow, which is why it "sort of" worked there.||on Nov 21|
|CPU Speed can be adjusted in DOSBox||on Nov 21|
|Well, I never heard of a TIMER that didn't reset at midnite either.||Clippy on Nov 21|
|DOSBox is weird that way...||on Nov 21|
|Well I have DOSBOX, but I'm not planning on making a habit of it.||Clippy on Nov 21|
|It resets to the actual time when I start DOSBox||on Nov 21|
|I like this guy!!!||Unseen Machine on Nov 28|
|Some answers||on Nov 22|