Page 1 of 1

LOOPS, QB64, QB4.5. and dos

Posted: Sat Jul 31, 2010 2:50 pm
by GarryRicketson
Actually a few questions....
1. Although in various tutorials there is a lot on loops I cannot figure
out ...I just want to make it loop (repeat) 5 times (for example)...
I thought it would be simple...DO
PLAY "abcdefg"
I want it to repeat 5 times...so what next?
UNTIL 5 is not correct...,after it repeats 5 times, , it would go to next block, if any......hope I make sense....yes I found ones Until a key is entered, or other ,but I just want it repeat x-nmbr of times, then move on.
Ok
2. I have just started useing qb64, I installed it in my windows(XP),...program files? mine is spanish,so archivos de programa...
and it works fine, how ever I cannot use the spanish keyboard How
do I change that? if I can it is cause in spanish we use !? ?? and also ?
and these don't type when I use qb64..I guess if I did it in note pad...
I just thought of that now...but it it still would be nice if I can do it directly
in the editor....
3. I have the QB4.5 in my Dos partition, also I like it very much ...
Should I also have it the windows, with qb64...or not neccesary..
it appears not to be neccessary..I had put the old QBASIC, off of DOS 7.1 into the windows C:\ directry, as windowXP did not have it....up untilnow I did not use windows much....strictly dos....ecause of the
problems of windows not being able to handle dos stuff, or only with Dos Box, and that is real limited...this QB64 is opening up a new world to me.
Ok guess thas it, and pleased to meet everyone here, Petessite has open up a new world for me too.
from Garry

Posted: Sat Jul 31, 2010 2:54 pm
by angros47
Answer to question 1:

The official way to repeat a set of commands is by FOR... NEXT

Code: Select all

for i= 1 to 5
play "abcdefg"
print "hello"
next

If you want to do the same in DO ... LOOP

I=0

Code: Select all

DO
I=I+1
play "abcdefg"
print "hello"
LOOP UNTIL I=5
You need to use a variable (the Iterator) that is increased every time the code is repeated (so, it count how many time the code has been repeated: the number of iterations)

When it is equal to, let's say, 5 (so, the code has been executed five times) the loop will terminate.

Posted: Sat Jul 31, 2010 4:05 pm
by burger2227
For those missing keys try the following:

? = CHR$(165)

? = CHR$(168)

? = CHR$(173)

Don't use the characters in variable names! They can just be printed!

Also you can enter them directly by holding down the ALT key and entering the code numbers above with the NUMBER PAD only. The number keys above the alphabet won't work. Hold down ALT, enter the number and release the Alt key. I just tested it in QB64.

Keep QB64 as far away from QB as possible! If you open a QB64 BAS file in Qbasic, the QB IDE will remove or hide all of the underscored keywords. If you SAVE a change, the BAS will not work in QB64 until you put all of the QB64 keywords back. Make BAS copies for QB use only.

Ted

Thanks ,I got the answers

Posted: Sat Jul 31, 2010 7:20 pm
by GarryRicketson
Ok thanks, I got the answers, so I can try them and see if it works,...
Later,...
from Garry
P.S. on the missing keys, That was kind stupid of me, I forgot that
I can use the alt-173 ,etc....and I have a chart, in m y dos program
showing all the alt-number codes for the various sympols( ascii)...I
simpley forgot....when I go to work in the morning, if me head was not
attached, I would forget it!

Posted: Tue Sep 14, 2010 10:06 pm
by VolcomStone54
Hello Guys,

Ohh. that life GarryRicketson ,sometimes im a stupid guy ,on that situation..
But i think it has been a misplace .

thanks a lot.



make money online

Posted: Tue Feb 15, 2011 6:01 am
by amoniha
How can I play classic DOS based text games (interactive fiction) on my new computer with Windows Vista? I would like to play some of the classic text-based interactive fiction games on my new computer, which runs Vista. The Program Compatibility Wizard will not run them. Do I need to get a DOS emulator? Or is there a source for the games where they are updated to run on newer machines?
________________________
keyword research ~ keyword tool ~ keyword tracking ~ affiliate elite

Posted: Tue Feb 15, 2011 8:22 am
by GarryRicketson
I use DosBox: http://dl.dropbox.com/u/15387474/DOSBox ... taller.exe Yes you need some kind of emulator Also this on is pretty good http://dl.dropbox.com/u/15387474/VDMSound2.1.0.exe
and there are others,,...
good luck from Garry
P.S. The best way, is to have a seperate partition, for Dos, and run the games from Dos, but this is a little more complicated to do,...if you have trouble with my downloads, both of these are available at source forge,
http://www.sourceforge.net
http://weeklyqbasicandqb64lesson.smfforfree.com/