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 / FOR NEXT loop - mysterious problem

Author
Message
xsankyo
14
Years of Service
User Offline
Joined: 13th May 2010
Location: Italy
Posted: 22nd May 2010 19:52
Hi everybody, i'm from Italy, sorry for my bad English

why if i write this simple program

for w=1 to 100
print "ciao"
next

compiler return "NEXT only takes one parameter at line 1" ?

i simply copy this from help
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 22nd May 2010 22:31
Do not forget to close the nested loop with the variable you used to define it`s range, in your case this is "w"



Where there is a will, there is a way.
I often edit my posts, that`s who i am
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd May 2010 22:49
It's actually a very minor compiler bug causing this.

Put another command after the NEXT statement (eg WAIT KEY, or END) and all will be well.

xsankyo
14
Years of Service
User Offline
Joined: 13th May 2010
Location: Italy
Posted: 23rd May 2010 11:29
Thanks to all
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 23rd May 2010 16:14
And actually you can write anything behing "next" it just need to have something behind it, it`s bug i think.

Where there is a will, there is a way.
I often edit my posts, that`s who i am

Login to post a reply

Server time is: 2024-09-28 18:27:13
Your offset time is: 2024-09-28 18:27:13