Written by

Question Nezla · 3 hr ago

Quit argument error

Hi Guys,

I get a Quit argument not allowed error in an if block how can I fix this?

Thanks

Product version: IRIS 2025.2

Comments

Yaron Munz · 2 hr ago

The Quit command is quitting the if statement therefore no value is allowed.

Clean code is not to have multiple places that quit with value, in long code it is difficult to track. Therefore a nice structure could be:
Ser result=1
If [condition] { ... set result=0 }
else { ... set result=1 }
Quit result 

0
Julius Kavay  36 min ago to Yaron Munz

The problem is NOT the QUIT in an IF statement, the problem is, using a QUIT WITH ARGUMENT in a TRY/CATCH statement.

0