Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
SUB inc(a,b)
a=a+1
exit SUB when a>10
b=b+1
End SUB
Call inc(1,0)
please give m,e explination how it works ?
It is just like a normal if and else case.
If a=a+1 is true then the subroutine will exit otherwise it will check if a>10 and then go next check for b=b+1.
You can actual test it by running it with different parameter values
Sub routine will have a piece of code that can be called by using the keyword CAL in the script part as many times you can this reduces the complexity of rewriting the code
It is just like a normal if and else case.
If a=a+1 is true then the subroutine will exit otherwise it will check if a>10 and then go next check for b=b+1.
You can actual test it by running it with different parameter values