Solved

How to interrupt a procedure with an if condition?

  • 8 November 2021
  • 1 reply
  • 19 views

Userlevel 1
Badge

Hi,

 

I want to interrupt a procedure with an if condition. For example:

if (a condition) then

   TestProcedure1;

else

   *interrupt current procedure;

endif;

 

I know I can use BREAK; to stop the loops. But how can I stop a procedure?

icon

Best answer by MarcelRoelofs 8 November 2021, 14:32

View original

1 reply

Userlevel 3
Badge +2

@afattahi 

 

Depending on what you want, you can call the “return” statement with or without a return value, or if you want to indicate an error, you can call “raise error ...” which you can then subsequently catch in a block-on-error statement.

 

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator