×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How do I save QBASIC files so they can run on their own?

How do I save QBASIC files so they can run on their own?

How do I save QBASIC files so they can run on their own?

(OP)
^--- QBASIC newb in training.
That being said, how can I save a QBASIC file such that it can be run independent of QBASIC?  So far I've made little programs within it and run them fine just by pressing F5, but how can I save them such that they will run on their own, outside of QBASIC?
Any help would be greatly appreciated :).

RE: How do I save QBASIC files so they can run on their own?

QBASIC itself does not generate stand-alone files. QuickBasic, on the other hand, does. Search the net for Quick Basic 4.5 for a download.

RE: How do I save QBASIC files so they can run on their own?

make that search term QuickBasic 4.5

RE: How do I save QBASIC files so they can run on their own?

Once you have a qbasic program that works and you want to execute it in a batch file do the following after saving it.

1 be sure to use fully qualified names for everything.
2 change the "END" statement with a "SYSTEM" statement.
  it ends the program and returns to the command level.
3 use only 8 character names for file/folder names.
  qbasic doesn't support longer file nAMES.

to execute do the following use fully qualified names everyplace.

on your bat file you could specify "FILEA.TXT" as the first parameter which is %1 in the bat file

ENTER THE BAT FILE TO EXECUTE:

      MYBAT.BAT   FILEA.TXT

then IN BAT FILE:

      SET XYZ=%1

then when you want to run the program use the "/RUN" option

      C:\qbasic\qbasic /RUN C:\PAYROLL\PAYREG.BAS

In your program you can get the value of xyz by

     myxyz$ = environ$("xyz"

I discussed moue than you asked for but thought thses would be likely followup questions.

QBasic is better then most people think it is. Also get a copy of QuickBasic if you want or TurboBasic both of then generate compiled executable programs once you get used to the PDE/IDE.

Computer thought: I teach a lot of programming so I can learn. You can never learn it all.

RE: How do I save QBASIC files so they can run on their own?

(OP)
I managed to save the game I found as a .exe, but when I try to play it my entire screen goes black. Tried this with other QBASIC games also...as I'm trying to learn QBASIC to make games it's a bit disconcerting that I can't play any of them...anyone know what the problem is O_o?

RE: How do I save QBASIC files so they can run on their own?

Qbasic isn't a very good language for games because of it's lack of Windows type "window support". It's screen options are pretty limited and if you are trying to run the program under windows in XP then the system has to emulate qbasic options.
Example: with different characteristics such as QBasic with 16 colors on 640x480 within an Windows/XP 1200x800 with 16 million colors.

I am not into gaming so I can not help.

Computer thought: I teach a lot of programming so I can learn. You can never learn it all.

RE: How do I save QBASIC files so they can run on their own?

I'd do what PROFESSORSPARKIE said above and run your program through a batch file.

monkeysnake <.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close