It's your friendly, neighborhood idiot here, with a question

Just starting out? Need help? Post your questions and find answers here.
HarryO
User
User
Posts: 42
Joined: Wed May 07, 2003 4:25 am
Location: Palatine,IL.,USA

It's your friendly, neighborhood idiot here, with a question

Post by HarryO »

Will/should a procedure exit immediately when a
'Procedurereturn' is encountered?

Not mentioned it the doc's.

I am on PB 3.70 w/updates

Example:

Code: Select all

Procedure.l Test()
 For x = 1 to 10
  if x = 5
   procedurereturn x
  else
   procedurereturn -1
  endif
 Next x
endprocedure

HarryO
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

It exists imidiately. But i don't know if it's a god idea to do it in the middle of a loop, can be problems with the stack perhaps? Fred would know if this is an issue..
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It's not a bug and it shouldn't not have a stack issue. We will update the docs, thanks !
Post Reply