Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sub routine explination?

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 ?

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

2 Replies
Not applicable
Author

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

Not applicable
Author

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