Page 1 of 1

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

Posted: Mon Jul 07, 2003 6:45 am
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

Posted: Mon Jul 07, 2003 8:29 am
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..

Posted: Mon Jul 07, 2003 10:44 am
by Fred
It's not a bug and it shouldn't not have a stack issue. We will update the docs, thanks !