Restart Statement Example
Previous Topic  Next Topic 

Below is an example of the restart_statement



main

      f();

end


func f()

    int x;

   x=do_something();

   // Check for error return

   if(x < 0)

     // Carry out some action

      hangup_call();

 

     // this will clear all variables and restart the program

     restart;

  

   endif


    ...

end