in reply to Re: print command runs after call to subroutine
in thread print command runs after call to subroutine
The alternative you suggest for the display subroutine makes sense. So I guess it's good practice to always have a sub return a value and have that display in the "main" portion of the code rather than print anything within the sub itself (unless of course there is a specific need for that to happen)?
As for your other recommendations, to address those, I was just trying to write a sub that can accept any number of parameters rather than a fixed amount. I would imagine that in a more concrete scenario, a fixed number more likely be used.
Thank you for the help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: print command runs after call to subroutine
by Corion (Patriarch) on Oct 19, 2016 at 13:12 UTC |