Qbasicnews.com

Full Version: QuickBasic 4.0 HELP!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Am brand new to quickbasic and I am trying to convert an old DOS QuickBasic 4.0 program. I don't know what the common use of : is in QuickBasic so I am not sure how to read the following:

IF NLB = 0 THEN Note(8) = 2: NLB = 80
IF PREVNAME$ = "" OR Prev$ = "blank " THEN 3990

I am unsure of how to read the if line. Does this mean that if NLB=0 then Note(8)=2 AND NLB=80??

Or does the NLB=80 get executed regardless of the result of the if statement?

Also, are there any converters available that will convert these QuickBasic 4.0 programs to something that will work on a Windows 2000 Pro machine?

Any help would be much appreciated.
Aimee
a colon denotes a new line, so yes you were correct about that. About the Windows 2000 thing..... we've all wanted that, but sadly it doesn't exist Sad
So how do If statements work? The following:

IF Prev$ = "graspast" AND Rn <= 0 THEN Rn$ = "0 - 40 ": Rn = 40: GOTO 4120

There is no end if statement. So is every line after the if statement considered dependent on result of IF??
For above, are Rn=40 and goto4120 executed only if the if statement is true?? Or are they executed no matter what??

Sorry to be so dumb about this, just not sure how it works, and I can't find documentation.
Almost all old QB sources work in Windows 2000....
The only problems I have found are:

-Speed is irregular when other programs run in the background
-Shell calls may not work, because the command lines for dos instructions are different (it has been an issue with every new DOS version)
-Must install VDM Sound to make Soundblaster code work.
-Some problems with mouse in SVGA modes

And off course if your program uses EMS or XMS you must enable it at the program's shortcut properties.

What does'nt work in your program?
When we try to run this DOS program on a Windows 2000 machine we get errors like the following:

Disk Media Error at address 056B:0541
Quote: So how do If statements work?

Everything after the THEN is a result of the truth of the IF. It's just as if it had an END IF and multiple lines; it's just a convenience for us lazy basterd qb programmers to do this.

You cannot pair more lines on the same line as the IF not dependent on the truth value of the IF. You can, however, add in sub-IFs into the line:

Code:
CLS
FOR I% = 1 to 3
IF a% > 1 then IF a% = 2 then print "1" else print "3": else print "1"
NEXT I%
I never had an error like this...
(I have an NTFS partitioned HD, and QB reads it ok)
What kind of operation is the program doing when the error appears?
If you want you can mail me the source so i can test it in my system...
Quote:What kind of operation is the program doing when the error appears?
If you want you can mail me the source so i can test it in my system...
Antoni - right now I am bound by contract and can not reveal any of their source code as it is intellectual copyright of that company. However, we may be looking at the option of subcontracting a Quickbasic programmer to put this into a working version on Windows 2000. Would you be interested in doing something like this?
Adoggett:
Thanks for your offer, but I'm not interested. QB is just a hobby for me.
Quote:However, we may be looking at the option of subcontracting a Quickbasic programmer to put this into a working version on Windows 2000.

Intellectual copyright? [Image: rolleyes_smile.gif]

Subcontracting? :rotfl:

I would probably be able to say that 99% of the proggers here are only here cos QB progging is a hobby.

You mean you were actually gonna make some money out of QB progging? :rotfl: I am very interested in your market...
Pages: 1 2