More Qbasic, Quickbasic Answers
Question Library
Ask a question about Qbasic, Quickbasic
Volunteer
Experts of the Month
Expert Login
Awards
About Us
Tell friends
Link to Us
Disclaimer
|
| |
|
|
| |
| | | |
About 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, c/c++, python, 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 Hobby programming since 2000
I no longer belong to any community programming groups, but do have knowledge of *basic dialects and C/C++
| | |
| |
You are here: Experts > Computing/Technology > Basic > Qbasic, Quickbasic > Some other questions
Expert: Alex Barry - 10/21/2009
Question Dear Alex,
I have some general questions today. Please help me with them:
1. How do you input only 1 character from the keyboard? I need the user to input only 'Y' or 'N'
2. How do you save program as .EXE in Qbasis 1.1(the version I have). If it can't be done in this version, can you provide some links to the newer versions?
Answer Hi, Shane,
For question#1, you can use this code:
PRINT "Question? [Y/N] ";
DIM answer AS STRING * 1
answer = INPUT$(1)
answer = UCASE$( answer )
IF answer = "Y" then
' if the user selected yes....
ELSEIF answer = "N" then
' if the user selected no....
ELSE
' maybe some sort of error handling or maybe make a loop that will keep going until you type either Y or N
END IF
Question#2. Qbasic1.1 will not make executable files. The earliest most acceptable version of QBasic to do that is QB4.5 I think this link is active http://www.geocities.com/muratelic/qb45.htm
I think one of the links on there is dead, though, so you may have to do a little trial and error to get the download to work. Try and QBNZ link first.
I hope that answers everything, and helps you out,
Take care,
-Alex
Add to this Answer Ask a Question
|
|