Questions tagged [qbasic]

QBasic is a general-purpose interpreted programming language derived from QuickBasic 4.5. QBasic replaced GWBasic starting from MSDOS 5. It became popular, because it had a quite advanced IDE with a debugger and was delivered free with MSDOS, Windows 95 and 98. The well-known game 'Nibbles' was written in QBasic. QBasic was written by Paul Allen (Microsoft) in 1991. Also see [tag:quickbasic]

QBasic replaced GWBasic starting from MSDOS 5. It became popular, because it had a quite advanced IDE with a debugger and was delivered free with MSDOS, Windows 95 and 98. The well-known game 'Nibbles' was written in QBasic. QBasic was written by Paul Allen (Microsoft) in 1991.

You are able to make some code samples for your questions via Repl.it online interpreter for QBasic

Also see

178 questions
2
votes
5 answers

Printing The Lowest Number From An Array Using DO UNTIL LOOP

I'm writing a QBasic program that will receive the marks of 10 students using DO UNTIL loop and compute the lowest mark, but my program always seems to freeze when I run it and enter the 10 students marks. I tried everything that I know to, but it…
2
votes
3 answers

How to Enable Scroll Bar of QBasic Output Window?

I'm trying to display a statement 1000 times in QBASIC (using for statement). I think the program works properly, but I cannot see the 1000 statements because I cannot scroll up and down in the output window of QBASIC. I can see only the last part…
MCB
  • 21
  • 1
2
votes
2 answers

qbasic to python how to

I am trying to convert some old qbasic (a old dos basic) code to python. I know python but not much qbasic (other than guessing the meaning of the syntax). This is the qbasic code 1020 DIM XS(499), A(504), V(99) 1560 GOSUB 2600 'Get…
user35202
  • 389
  • 1
  • 10
2
votes
2 answers

Qbasic - trying to call a sub, but i get a message that says "Expected CALL, subname, (...)"

Here is the code, it takes 5 names and alphabetizes them. I have a sub that sorts the names but apparently i'm not calling it in the correct way. DIM i AS INTEGER DIM q AS INTEGER DIM a AS STRING DIM n(5) AS STRING DIM z AS INTEGER DIM x AS…
Michael
  • 31
  • 3
2
votes
2 answers

Explicit line numbers and execution order

GW-BASIC and many other old BASIC dialects like C64 BASIC allowed you do something like this: 20 PRINT "World" 10 PRINT "Hello" and that would result in the following output when the RUN command/statement was executed: Hello World The LIST…
user539810
2
votes
1 answer

Receiving and Sending Strings over the Network in QB64

I'm working on a mini pokemon game for my brother that works over the network. Unfortunately, when testing I find that for some reason, it gives an error about "Bad file name or number" only on the lines where it tries to send a string to another…
Mark
  • 49
  • 5
2
votes
1 answer

Syntax error with UCASE$?

Not sure what this means. It says it's a syntax error with UCASE$ but can I not put letter$ in there? CLS PRINT "Do you want lower case or upper case? (U/L)" DO CASED$ = INKEY$ LOOP UNTIL CASED$ = "U" OR CASED$ = "L" IF CASED$ = "L" THEN …
Kyle Chau
  • 21
  • 1
2
votes
1 answer

How To Trap Control-Alt-Delete In QB64

I am using the following code in QB64 to trap Control-Break: ON TIMER(1) GOSUB breaktrap TIMER ON x = _EXIT ' disable break DO _LIMIT 50 x$ = INKEY$ LOOP breaktrap: v = _EXIT IF v THEN PRINT "*break*" SLEEP 5 SYSTEM END…
eoredson
  • 1,167
  • 2
  • 14
  • 29
2
votes
3 answers

How To Get Default Directories Of Drives In QB64

I have been using the following code to get the default directories of all drives, however I don't want to use _CWD$ is there a more efficient way to do this? REM get default directory of drives. ON ERROR GOTO ErrSub FOR D = 1 TO 26 D$ = CHR$(D…
eoredson
  • 1,167
  • 2
  • 14
  • 29
2
votes
1 answer

How To Encrypt File In QB64

Am attempting to encrypt a file using this program in QB64. It does not actually encrypt the file and always returns successful. Why? DECLARE LIBRARY FUNCTION EncryptFile (f$) FUNCTION DecryptFile (f$, BYVAL f&) END DECLARE PRINT "Enter…
eoredson
  • 1,167
  • 2
  • 14
  • 29
2
votes
2 answers

Why do these idneitcal QB calculations produce slightly different values?

So, I'm trying to port some very old and venerable engineering analysis QBasic 4.5 code into C. I'm trying to match results exactly, and I find that I can't quite understand how QB does its math. For example, these two lines DIM a AS SINGLE DIM d2…
Chris
  • 629
  • 1
  • 10
  • 28
2
votes
3 answers

Qbasic Highlighted Menu

Does anyone have an example code or instructions for making this work? I've just never been able to accomplish a highlighted menu that uses the arrow keys and enter for selections. Thanks in advance! I anticipate this working by drawing boxes for…
Inward Jim
  • 47
  • 7
2
votes
4 answers

What is the command and syntax for breaking/stopping a program in QBASIC?

I am currently writing a QBASIC program that runs an indefinite loop (while loop). However, if a certain condition is met, I want to exit the program. What command do I use, and also what is the syntax. Thanks
csrockstar
  • 55
  • 1
  • 9
2
votes
2 answers

Online multiplayer Qbasic Gorillas?

I want to play that Qbasic Gorillas game with someone that lives in Florida. Here's the flash version online Gorillas This link is to someone's post about the remake he programmed - there is a link to the game above in there and also his source code…
CheeseConQueso
  • 5,831
  • 29
  • 93
  • 126
2
votes
3 answers

Type mismatch when converting averages to grade (beginner)

I am taking a computer sciences class right now, and I just have no idea how to convert an average made from 3 scores to a letter grade. At first I thought I could do something like: PRINT name$(c); TAB(6) ; USING("###.#", average(c)) As: PRINT…