[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Procedures



How about a simple GOTO? If you want to exit a procedure just place the
label right before your end-procedure. For instance:

begin-procedure trythis
  if x=1 then
     y=2
     goto exit-trythis
  end-if
  if y=2 then
     x=1
  end-if
exit-trythis:
end-procedure trythis

If trythis is called and x=1, the second if statement is never executed and
y will not be altered.

-----Original Message-----
From: Derrick Fisher [mailto:DFisher@CO.NEW-CASTLE.DE.US]
Sent: Wednesday, July 12, 2000 4:06 PM
To: SQR-USERS@list.iex.net
Subject: Procedures


Is there any command you can use to leave a procedure before reaching the
end-procedure command. For example say there are multiple IF statements in a
procedure and as soon as an IF statement executes you want to exit the
procedure so that no more IF statements will be processed. Is there some
form of EXIT command in SQR you can use to do this ?