Computing.Net > Forums > Disk Operating System > qbasic command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

qbasic command

Reply to Message Icon

Name: Jolyhils
Date: April 19, 2001 at 11:55:52 Pacific
Comment:

Hi,

Is it possible to have qbasic run a command and let the output of that program be put in a variable?

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: baz
Date: April 20, 2001 at 00:53:41 Pacific
Reply:

This example grabs to output of the VER command and puts it in A$..

SHELL "ver > test.txt"
OPEN "I", #1, "test.txt"
INPUT #1, A$
INPUT #1, A$
CLOSE #1
SHELL "del test.txt"
PRINT A$

I've read in A$ twice because VER outputs a blank line, then the result, then 2 more blank lines.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: qbasic command

Qbasic www.computing.net/answers/dos/qbasic-/6832.html

Running QBASIC programs via batch www.computing.net/answers/dos/running-qbasic-programs-via-batch/8128.html

Loading dos prg from basic www.computing.net/answers/dos/loading-dos-prg-from-basic/7051.html