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 / Help with while loop

Author
Message
ripall
8
Years of Service
User Offline
Joined: 13th Nov 2016
Location:
Posted: 13th Nov 2016 15:44
Hi

I am trying to create a basic while loop that checks to see if a number entered is higher or lower that the desired range.
I have tried using to WHILE statements



although this works initially if I enter 0 then 99 and 0 again it ends the loop and prints 0 a number outside the desired range. Is there a way to accomplish this using just one WHILE loop or an easier way of doing it?
Thanks
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Nov 2016 21:22
Try...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
ripall
8
Years of Service
User Offline
Joined: 13th Nov 2016
Location:
Posted: 14th Nov 2016 14:54
Thank you BatVink works perfectly.

I knew it would be something simple but after a couple of hours my head was fried

Login to post a reply

Server time is: 2024-11-27 04:12:09
Your offset time is: 2024-11-27 04:12:09