You are here:

Qbasic, Quickbasic/running the program directly

Advertisement


Question
Hello!! :) i have made a program and i want to change the extension ".bas" to ".exe" so that while double clicking the file it will directly open the output screen without showing the code part!! could you please help me with this??

Answer
Hi Sagar,

The process you're talking about is called compiling, which takes your code and turns it into machine code.  This is actually a fairly automated process with QBasic 4.5 and above, _BUT_ because QBasic is a DOS-based interpreter (and compiler), which is 16-bit, and modern Windows uses 32-bit and 64-bit, so it can't natively be run.

So, you have a few options for compiling your code:

1. Use a virtual machine and run FreeDOS or an older version of Windows XP (before Service Pack 2, I believe)
2. Try running your code using QB64, which can run on most modern operating systems, and can compile your QBasic code (with minimal modifications).
3. You could try FreeBASIC, which is like QB64, but it's just a command-line compiling tool which may not be easily familiar to you if your only experience is with QBasic's IDE.

I hope that points you in the right direction,

-Alex  

Qbasic, Quickbasic

All Answers


Ask Experts

Volunteer


Alex Barry

Expertise

I have been a qbasic programmer since 2000, creating games, minor libraries and various small programs. I have experience using interrupts, graphics, file input/output, the mouse cursor, and using libraries. I have also learned FreeBASIC, QB64, c/c++, python, lua, php and html.
I do not claim to be an absolute authority in any language, but I don't mind looking things up and learning with you.

Experience

I have been programming in *Basic dialects since 2000, as mentioned in my expertise. After a year of QBasic, I learned C and C++, and dabbled a little in ASM (I don't program in ASM - I literally just played around to see how things work). When QB64 and FreeBASIC were released, I played with those languages. At the time, FreeBASIC offered more functionality and I sided with that language for a while. During that time, while I was learning new languages, that I would see what scripting languages are available, where I took up python and lua. I started to notice a staleness to QB64's development (which I kept tabs on from time to time), and am now trying to be active in it's community and maybe in it's development in the future. Currently, I am only active on the QB64.net forums, but I appear on occasion on FreeBASIC.net's forums as well.

Education/Credentials
Highschool - 2007

©2016 About.com. All rights reserved.