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
LOOPS, QB64, QB4.5. and dos
- GarryRicketson
- Veteran
- Posts: 90
- Joined: Fri Jul 16, 2010 10:02 am
- Location: Cuencame,Durango,Mexico
- Contact:
LOOPS, QB64, QB4.5. and dos
From Garry: http://www.garryricketsonartworks.com" target="_blank
http://weeklyqbasicandqb64lesson.smfforfree.com/" target="_blank
http://www.garryricketsonartworks.com/phpbbforum/" target="_blank
http://weeklyqbasicandqb64lesson.smfforfree.com/" target="_blank
http://www.garryricketsonartworks.com/phpbbforum/" target="_blank
Answer to question 1:
The official way to repeat a set of commands is by FOR... NEXT
If you want to do the same in DO ... LOOP
I=0
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.
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
When it is equal to, let's say, 5 (so, the code has been executed five times) the loop will terminate.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
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
? = 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
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- GarryRicketson
- Veteran
- Posts: 90
- Joined: Fri Jul 16, 2010 10:02 am
- Location: Cuencame,Durango,Mexico
- Contact:
Thanks ,I got the answers
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!
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!
From Garry: http://www.garryricketsonartworks.com" target="_blank
http://weeklyqbasicandqb64lesson.smfforfree.com/" target="_blank
http://www.garryricketsonartworks.com/phpbbforum/" target="_blank
http://weeklyqbasicandqb64lesson.smfforfree.com/" target="_blank
http://www.garryricketsonartworks.com/phpbbforum/" target="_blank
-
- Newbie
- Posts: 1
- Joined: Tue Sep 14, 2010 9:48 pm
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
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
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
________________________
keyword research ~ keyword tool ~ keyword tracking ~ affiliate elite
Last edited by amoniha on Mon Feb 21, 2011 1:41 am, edited 1 time in total.
- GarryRicketson
- Veteran
- Posts: 90
- Joined: Fri Jul 16, 2010 10:02 am
- Location: Cuencame,Durango,Mexico
- Contact:
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/
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/
From Garry: http://www.garryricketsonartworks.com" target="_blank
http://weeklyqbasicandqb64lesson.smfforfree.com/" target="_blank
http://www.garryricketsonartworks.com/phpbbforum/" target="_blank
http://weeklyqbasicandqb64lesson.smfforfree.com/" target="_blank
http://www.garryricketsonartworks.com/phpbbforum/" target="_blank