- #1
alionalizoti
- 16
- 0
I am working with Quick Basic, 64 Bit for Windows, which is quite good indeed, but i met again the same usual difficulties to use [do ... loop] for efficient loops.
So I decided to better use [goto], as anyone else!
But I also found very useful the classical for loop.
Here are some useful examples.
for i = o to 1
{ program body }
i = 0
x$ = inkey$
if x$ = chr$(27) then i=1
next
or we can use
for i = o to 1
{ program body }
i = 0
x$ = inkey$
if x$ = "E" then i=1
next
or we can use
for i = o to 1
{ program body }
i = 0
x$ = inkey$
if x$ = "E" then
y$ = ""
input "enter wish: ", y$
if y$ = "exit" then i = 1
end if
next
if this has been useful, please make a sound and i shall have some extra points on my account from the good lord up there, trying to fix my lost points!
So I decided to better use [goto], as anyone else!
But I also found very useful the classical for loop.
Here are some useful examples.
for i = o to 1
{ program body }
i = 0
x$ = inkey$
if x$ = chr$(27) then i=1
next
or we can use
for i = o to 1
{ program body }
i = 0
x$ = inkey$
if x$ = "E" then i=1
next
or we can use
for i = o to 1
{ program body }
i = 0
x$ = inkey$
if x$ = "E" then
y$ = ""
input "enter wish: ", y$
if y$ = "exit" then i = 1
end if
next
if this has been useful, please make a sound and i shall have some extra points on my account from the good lord up there, trying to fix my lost points!