Options

Exit

jmlozaresjmlozares Member Posts: 110
When should I use EXIT function?
Janderol Lozares Jr.
Manila, Phils.

Comments

  • Options
    GoMaDGoMaD Member Posts: 313
    You can use it in a function.

    When you come to a point when you want to leave the function and skip the coding behind the exit. Used mostely in an IF statment.
    IF A>B then 
      EXIT;
    
    C = B + A;
    

    If A is larger than B the function will stop and the addition will not be executed.

    Exit can also be used in connection with a return value of a function
    then the syntax is:
    EXIT(varReturnValue);
    

    varReturnValue will be given back to a variabel used in the Function call.

    Hope this helps!

    Regards,
    Now, let's see what we can see.
    ...
    Everybody on-line.
    ...
    Looking good!
  • Options
    jmlozaresjmlozares Member Posts: 110
    Thanks, that helped a lot!!
    Janderol Lozares Jr.
    Manila, Phils.
Sign In or Register to comment.