Search found 132 matches

by Antoni
Sat Dec 03, 2005 11:14 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Can QBASIC decect your OS
Replies: 13
Views: 19581

Microsoft used to recomend to use ENVIRON$:
-If the variable windir exists, you are in a shell in some version of windows (from 3.0 to XP)
-If the variable OS exists you are in windows NT-2000-XP

Not so accurate as SHELL "VER>file"...
by Antoni
Sat Dec 03, 2005 11:05 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: QuickBasic Compile with /mbf
Replies: 7
Views: 7872

Perhaps you are linking with a non-mbf module? Wrong run-time lib?

I'm afraid i can't be of more help, as I have never used the /mbf option.
by Antoni
Sat Dec 03, 2005 10:45 am
Forum: QBASIC and QB64 Questions & Answers
Topic: odd or even
Replies: 20
Views: 31265

Guest: Nek's code works... if every variable is integer. You are probably using the QB defaults that make all variables floating point, so rounding errors may prevent the code from work. The easiest workaround is to put a pair of parentheses in the IF condition. berth = int(rnd * 16) + 5 if (berth A...
by Antoni
Thu Dec 01, 2005 12:17 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Compatibility
Replies: 15
Views: 22041

Programs doing "plain QB" work without a problem. You will run into problems if you use game libraries that access SVGA modes, EMS memory and/or soundcard. Tweaking with hardware ports is not allowed at all. There are workarounds to all of these problems but they require special settings o...
by Antoni
Wed Nov 23, 2005 2:20 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Graphical Utilities
Replies: 2
Views: 4650

For the QB bload format, you can use any editor, do a standard bmp, then use one of the qb programs that convert bmp to bload...
Here is one of them:
http://www.qb45.com/index.php?page=down ... oad&id=638

FreeBasic can bload standard bmp files so any editor is OK.
by Antoni
Wed Nov 23, 2005 2:16 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Does Anyone Else Think It's Time
Replies: 7
Views: 12629

To bad subjects I would add "Does not work!" and "OK, guys, now explain this to me!" :D
by Antoni
Wed Nov 23, 2005 2:14 pm
Forum: Freebasic Questions & Answers
Topic: FreeBASIC stuff
Replies: 10
Views: 22011

If by loading you mean the program does not compile or does not run as expected, FB and QB differ in some aspects, you have the list here
http://www.freebasic.net/wiki/wikka.php?wakka=LangQB

BTW: A .bas file must be saved in text format to be readable by anything else than QB.
by Antoni
Tue Nov 22, 2005 3:10 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Making your own fast font routine? (or speed up this one?)
Replies: 8
Views: 8937

Ok, this is a problem with QB not having unsigned integers. You can try compiling the code or try this (i hope last) one using LONG variables: '$include:'qb.bi' declare SUB font (text$, X%, Y%, clr%) screen 12 dim regs as regtypex dim shared segm%, offs& regs.ax=&h1130 regs.bx=&h0300 cal...
by Antoni
Mon Nov 21, 2005 3:00 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help finding strings
Replies: 6
Views: 6841

He said each record had 66 LINES .... NRecordLines=66 Linetoread=8 ColToRead=12 Charstoread=17 open "MyData.txt" for input as #1 open "MyOutput.txt" for output as #2 n=0 do n=n+1 for i=1 to NRecordlines line input #1,a$ if i=linetoread then print #2; n,mid$(a$,coltoread,charstore...
by Antoni
Tue Nov 15, 2005 3:03 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Transparency?
Replies: 11
Views: 13030

Or use Plasma/Rel 's SuperPut
http://www.phatcode.net/downloads.php?id=166
It was very used just before FB sucked our brain :D
by Antoni
Thu Nov 10, 2005 5:17 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Making your own fast font routine? (or speed up this one?)
Replies: 8
Views: 8937

An example: declare SUB font (text$, X%, Y%, clr%) screen 12 k%=0 for i%=0 to 7 for j%=0 to 60 font "This is a demo",120*i%,8*j%,k%+1 k%=((k%+1) mod 14) next next sleep end SUB font (text$, X%, Y%, clr%) x%=x%-7 DEF SEG = -90 'make even the length if len(text$) and 1 then text$=text$+"...
by Antoni
Wed Nov 02, 2005 2:33 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Counter counting by two?
Replies: 3
Views: 4284

I see four counters in your code, which one does not work?
If you're speaking about intcount you are specifically increasing it by 1 twice every call to B010Process. Is this the problem?
by Antoni
Tue Oct 25, 2005 2:02 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: BSAVE and BLOAD
Replies: 5
Views: 7773

Forget about loading JPEG in QB, I once did a loader, it added 30K to the compiled program. JPEG is off limits for everyday use in QB.
You can find several good gif loaders around.
by Antoni
Tue Oct 25, 2005 1:54 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: PRINT Strings
Replies: 5
Views: 6511

Even simpler: DIM WorkName(1 TO 5) AS STRING WorkName(1) = "Stephane Richard" WorkName(2) = "Pete Berg" WorkName(3) = "Alice Cooper" WorkName(4) = "Terry Fox" WorkName(5) = "Kristian Virtanen" REM Assuming that no name is greater than 30 characters. ...
by Antoni
Wed Oct 19, 2005 10:38 am
Forum: QBASIC and QB64 Questions & Answers
Topic: check for file existence and then condition statement
Replies: 30
Views: 42620

In the ugly and powerless batch scripting language of DOS and W9x, zero length files were used by the more 1337 programmers to overcome the limitations of the language. Zero length files made good flags. And I remember a way to separe a file name from its extension using a dummy file and REN... I mu...
by Antoni
Thu Oct 13, 2005 3:01 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need a PLAY code... (read to find out which one)
Replies: 29
Views: 43240

I would be surprised if your sound was'nt here:

http://www.qbasicnews.com/abc/showsnipp ... snippet=19
by Antoni
Thu Oct 13, 2005 2:55 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: check for file existence and then condition statement
Replies: 30
Views: 42620

Well, you just want DEL not to mess your screen layout with it's error message if the file does not exist, is'nt?
In windows XP, 2000,( NT?) you can just redirect the error messages to the NUL device.

Code: Select all

SHELL "DEL /y README.TXT >NUL 2>&1"
It will not work in W9x or DOS
by Antoni
Tue Oct 11, 2005 9:37 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Several questions
Replies: 10
Views: 14418

Re: Several questions

I have a couple of questions. Firstly, I notice that well done games never have a problem with flicker. I've also noticed that in relsoft's polygon files, he uses something called the setvideoseg which seems to get rid of flicker and black blocks behind sprites. Can anyone give me anymore info on t...