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
21
votes
8 answers

What are the advantages of using Virtual Machine compilation (eg. JVM) over natively compiled languages?

I've heard that the advantage of java is that people can write code, compile it for the JVM, and run it anywhere. Each person just needs a JVM app for their platform. Of course, it looks similar to the current situation, where everybody has a…
barlop
  • 12,887
  • 8
  • 80
  • 109
14
votes
3 answers

Here's an old school IF statement for you, but there is a problem

I have an IF statement in QBASIC... yes... QBASIC... I have been teaching someone to program (I decided this would be nice and easy to see how the syntax works). ...Anyway, I have this code: CLS start: INPUT ">>", a$ PRINT a$ IF (INSTR(a$, "do…
Barrie Reader
  • 10,647
  • 11
  • 71
  • 139
9
votes
4 answers

QBasic language spec

I have been challenged by a friend to write a QBasic compiler in QBasic. Where can I find a language specification for the latest version of the language?
Simon Johnson
  • 7,802
  • 5
  • 37
  • 49
8
votes
1 answer

Looking for the Nibbles game rewritten in C#

I am writing a console app that would be kicking off long running processes. So rather than let the user stare at the screen for several minutes, I'd love to throw my processing on a background thread and let the user play a game meanwhile. If…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
7
votes
1 answer

Convert program from QBasic to Python

Im trying to convert a program that I made in Basic! (QBASIC on iOS) to Python. I am slowly working my way through Python for Dummies but I am stuck on how to convert FOR loops. Can someone help? Bellow is the QB code. REM Prime Numbers v2 REM Av…
BlackDuke07
  • 71
  • 1
  • 3
7
votes
4 answers

How can I convert QBASIC PLAY Commands to Something More Contemporary?

I have play commands in my QB application like this: PLAY "MSe8f#4f#8f#8g8a8b4.a4.g4.f#4.o0b8o1e8e8e4d8e2." I'd like to convert these somehow into something modern applications could use. Any thoughts? I'm currently messing around with the…
Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
6
votes
3 answers

How to Read RS232 Serial Port in PHP like this QBasic Program

I'm trying to port the following small QBASIC program (which works 100%) to PHP: OPEN "com1:2400,n,8,1,DS," FOR RANDOM AS #3 OPEN "data.dat" FOR OUTPUT AS #2 REM read 17 chars from the port scale$ = INPUT$(17, #3) PRINT scale$ WRITE #2, scale$ CLOSE…
CJ_
  • 61
  • 1
  • 1
  • 2
5
votes
2 answers

Are there any contemporary programming environments that are syntax-compatible with QBasic?

I've got an old book about learning to program in BASIC. It's very well written, entertaining, and does a great job of teaching the first steps in computer programming. It's also my first book about programming, which started it all for me. :) Now…
Vilx-
  • 104,512
  • 87
  • 279
  • 422
5
votes
4 answers

Why do we use "End If" statement?

Why do we write END IF statement in this program? Without writing it, we can easily get our result. Is there any example through which you can explain me the use of END IF statement? I have tried this: INPUT X IF X>10 THEN PRINT "X IS GREATER THAN…
Bhavesh Sood
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

Was there ever a first parameter for the CLEAR statement?

In both GW-BASIC and QuickBASIC, statements are passed arguments, some of which are optional and can be omitted depending on the statement: REM Move the text cursor to the specified column and row. LOCATE row%, column% REM Move the text cursor to…
user539810
5
votes
0 answers

Can I tell the QB64 compiler *not* to optimize my code?

I want to experiment with the efficiency of various algorithms and compiler optimization is an obstacle. Can I disable compiler optimizations in QB64?
Alex V
  • 3,416
  • 2
  • 33
  • 52
5
votes
4 answers

Is there any freeware QBASIC compatible IDE for BASIC?

What freeware IDE is available other than Visual Basic? Is there any freeware QBASIC compatible IDE for BASIC?
user366312
  • 16,949
  • 65
  • 235
  • 452
5
votes
7 answers

Two questions for old programmers

So I've been using QBASIC64 today... for old school's sake. I was wondering: a) What is the most complex QBASIC code you have ever written was and b) What is the most useful code you have written (examples would be nice but not imperative ^_^ - and…
Barrie Reader
  • 10,647
  • 11
  • 71
  • 139
5
votes
3 answers

Random number from 0 to 100 in QBasic

I need a totally random number from 0 to 10 or from 0 to 100 as a value "NUM" done in QBasic for a random draw program. I currently have this: RANDOMIZE TIMER: A = INT((RND * 100)): B = INT((RND * 10)): C = (A + B) NUM = INT(C - (RND * 10)) This is…
Gala
  • 2,592
  • 3
  • 25
  • 33
5
votes
2 answers

Converting QBasic CHR$(13)+CHR$(10) to C#

I'm trying to pass a straight ASCII text command through my serial port, something like this: string cmd = "Hello World. "; template.Serial.WriteLine(cmd); Serial being a SerialPort property reference. I've also tried 'Write(cmd)' but…
roadmaster
  • 593
  • 2
  • 9
  • 22
1
2 3
11 12