1 Reply Latest reply: Jan 15, 2012 7:29 PM by Angus Monro RSS

    How to Sub routine

      SUB inc(a,b)

       

      a=a+1

      exit SUB when a>10

      b=b+1

       

      End SUB

       

      Call inc(1,0)

       

      How to verify that the Subroutine gets invoke and way to print the values of a and  b. 

        • Re: How to Sub routine
          Angus Monro

          Use the TRACE statement - this will write a message to the log.  In its

          simplest form, you can put this on the line after the SUB inc(a,b)

          statement:

              TRACE Entered the subroutine;

          To show the value of a variable, use something like this:

              TRACE a=$(a);