Search found 134 matches
- Tue Feb 13, 2007 3:14 am
- Forum: QBasic / QuickBasic related
- Topic: Qbasic game controls
- Replies: 6
- Views: 1937
I am now more knowledgeable in moving figures or sprites in QuickBASIC. I have learned that using the INKEY$() function to trap a keypress has some overhead problems, as clearing out the keyboard buffer takes a measurable time! Instead, I have learned that one can use: K = INP(96) to capture the pre...
- Sun Feb 11, 2007 2:40 am
- Forum: QBasic / QuickBasic related
- Topic: Qbasic game controls
- Replies: 6
- Views: 1937
No, Dr_V. The accident was that I posted here, thinking I was sending you a PM, which I later did. But, I believe I have solved the problem very simply, even though I'm not sure I understand the logic behind my solution. Here it is. Simply enter my "keyboard buffer emptier: FOR I = 1 TO 15 K$ = INKE...
- Sun Feb 11, 2007 12:42 am
- Forum: QBasic / QuickBasic related
- Topic: Qbasic game controls
- Replies: 6
- Views: 1937
Keyboard buffer clearout
On October of 2004, you answered a question regarding the subject matter, but didn't give the manner of solution, at this site:
http://qbasic-forum.qbcafe.net/viewtopi ... t=keyboard
I have that problem, today, and wonder if you could give me a helping hand?
http://qbasic-forum.qbcafe.net/viewtopi ... t=keyboard
I have that problem, today, and wonder if you could give me a helping hand?
- Sat Jan 20, 2007 6:55 am
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
Dr_: The program ran fine (I added a SLEEP in the SUB). I saw the red circle being filled with a curve, starting from the cente, going one radius to the right, going 1/4 circle along the bottom, then reversing, then down again, then it started up on the left side, was coming down, and..."Out of stri...
- Sat Jan 20, 2007 5:30 am
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
Dr_: Ran your code in QuickBASIC 4.5, Got an error message, "Expected: variable or BYVAL or SEG or )" and the first BYVAL on the line SUB FloodFilll (BYVAL X. BYVAL Y, BYVAL Col) is highlighted. As to clearing the keyboard buffer, I somehow got rid of my problem, but, I'm not sure how, so, I haven't...
- Fri Jan 19, 2007 4:31 pm
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
Dr_: Could you expand some on your "I wouldn't suggest trying to go heavy on recursion with QB though." Would you please post a simple case of the recursion you mentioned? I ask this, so as to avoid the problem, myself. And, while you're at it, I would be very happy if you would explain to me just h...
- Wed Jan 17, 2007 2:17 am
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
Hopefully, someone more knowledgeable than I will answer that question. But, if not, you can use a simple stratagy, as follows: GOSUB Calculate ... ... ... Calculate: bla, bla, bla 'I want to quit the subroutine here, so: IF I$ = "Y" THEN GOTO CalculateEnd 'instead of IF I$ = "Y" THEN GOTO XY bla, b...
- Wed Jan 10, 2007 5:06 am
- Forum: QBasic / QuickBasic related
- Topic: QuickBasic 4.0 4.5 BOOK
- Replies: 7
- Views: 1828
I certainly will not deny anything that you have said, Buff1! It's just that, when I bought my 4.5, it was an update from Microsoft for 4.0, and they just sent me an envelope, containing the 4 or 5 disks containing all the files for 4.5, and, NO written instructions of any kind! So, I guess that, wi...
- Tue Jan 09, 2007 11:56 pm
- Forum: QBasic / QuickBasic related
- Topic: QuickBasic 4.0 4.5 BOOK
- Replies: 7
- Views: 1828
Gary, the problem of maintaining information over time is the subject of many philosophical desertations! Ever Isaac Asimov wrote quite extensively on those two subjects. To contain all the knowledge of just one item requires a number of symbols that, for all practical purposes, is infinite. So, we ...
- Tue Jan 09, 2007 4:15 am
- Forum: QBasic / QuickBasic related
- Topic: QuickBasic 4.0 4.5 BOOK
- Replies: 7
- Views: 1828
Perhaps this will narrow it down, somewhat. When I received my QuickBASIC Version 4.0, it came with a very voluminous manual, which I threw away a few years ago. When I received my QuickBASIC Version 4.5, it came with no manual at all! So, I think that you should probably be referring to Version 4.0.
- Mon Jan 08, 2007 8:10 pm
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
As to the lower case requirement, try:
Code: Select all
alldigit$ = LCASE$(alldigit$)
IF an$ <> "y" AND alldigit$ <> "n" THEN
PRINT " You entered "; alldigit$; " Please enter y or n"
END IF
- Sun Jan 07, 2007 6:39 am
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
However, your code requires one to Enter y or n. Merely pressing y or n does not make alldigit$ have anything, yet. For INPU, one must always do an Enter to get the data visible on the screen to the variable. And, the user may enter an uppercase letter, so you have to consider that. Also, with INPUT...
- Sat Jan 06, 2007 9:31 pm
- Forum: QBasic / QuickBasic related
- Topic: I need a sorting algorythm
- Replies: 6
- Views: 1860
- Sat Jan 06, 2007 7:16 am
- Forum: QBasic / QuickBasic related
- Topic: Use of GOTO
- Replies: 14
- Views: 3175
Instead of: alldigit: PRINT "Do you want to use all digits?" INPUT "Press Y or N and ENTER", alldigit$ IF alldigit$ <> "Y" and alldigit$ <> "N" THEN PRINT "ERROR":GOTO alldigit use a WHILE/WEND or a DO/LOOP loop, for instance: WHILE alldigit$ <> "Y" and alldigit$ <> "N" PRINT "Press Y or N" alldigit...
- Sat Jan 06, 2007 12:48 am
- Forum: QBasic / QuickBasic related
- Topic: I need a sorting algorythm
- Replies: 6
- Views: 1860