Jump to content

Photo

GFA Basic questions


6 replies to this topic

#1 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • 393 posts
  • RAP SUCKS!

Posted Sat Nov 24, 2018 6:25 PM

how do I create an endless loop,

just like 

 

 

10 PRINT "HELLO"

20 GOTO 10

 

better still

how do I break out of a loop also

because there is no CONTROL-C (break)?

 

i know about DO...WHILE

 

 

 



#2 Justin Payne OFFLINE  

Justin Payne

    Dragonstomper

  • 868 posts
  • Busy updating XEGS Podcast website to Angular6
  • Location:Kent, Washington, USA

Posted Sat Nov 24, 2018 7:17 PM

So, I don't know GFA basic but since there are no line numbers, a do-while is a perfect way to do an endless loop for sure but you also want to break out of said loop so I'd generally check for a key press of some sort to jump out.

#3 cvdavidsonjr OFFLINE  

cvdavidsonjr

    Combat Commando

  • 1 posts

Posted Sat Nov 24, 2018 7:25 PM

I found this on line it might help 



#4 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • Topic Starter
  • 393 posts
  • RAP SUCKS!

Posted Sat Nov 24, 2018 8:32 PM

thanks guys



#5 Christos OFFLINE  

Christos

    Stargunner

  • 1,053 posts
  • Location:Thessaloniki, Greece

Posted Sun Nov 25, 2018 1:58 AM

It is do loop. You can do an exit if inkey$ for example to break

#6 ggn OFFLINE  

ggn

    Stargunner

  • 1,479 posts
  • Location:Athens, Greece

Posted Sun Nov 25, 2018 5:57 AM

do
   print "hello"
loop until inkey$<>""

Edited by ggn, Sun Nov 25, 2018 5:58 AM.


#7 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • Topic Starter
  • 393 posts
  • RAP SUCKS!

Posted Sun Nov 25, 2018 9:38 AM

ah...

 

great!






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users