Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / IF statement LOOP problem

Author
Message
Epiphora
12
Years of Service
User Offline
Joined: 28th May 2012
Location:
Posted: 31st May 2012 20:30
Hi, I'm having a little trouble with my IF statement at the end here.



This is probably a really long way of creating this program but whilst I was writing it I realised I didn't know which loop to use to get back from the y$ command at the end to the choice of squares to see.
I would have used GOTO line number but it didn't work.

Thanks
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 1st Jun 2012 03:11 Edited at: 1st Jun 2012 03:12
Make subroutines like

Boxes:
`Put box code in here, and put this at the end of your code

Return

`Then at the end, and the beginning put
Gosub Boxes

Epiphora
12
Years of Service
User Offline
Joined: 28th May 2012
Location:
Posted: 1st Jun 2012 12:24
Ok, not really sure where that goes as didn't work where I put it.
I haven't reached the subroutine tutorial yet so hopefully it will all become clearer soon.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Jun 2012 12:52
At the top:



and at the bottom:



zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 2nd Jun 2012 04:01 Edited at: 2nd Jun 2012 04:01
I think this is a good example of where SELECT CASE statements could be used. Here is some quick modifying of your code to see how it would work for you:


Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Epiphora
12
Years of Service
User Offline
Joined: 28th May 2012
Location:
Posted: 6th Jun 2012 22:52
Thanks for the suggestions, will play around and get used to these commands

Login to post a reply

Server time is: 2024-11-22 00:12:53
Your offset time is: 2024-11-22 00:12:53