Robert Bridges
2020-05-31 20:06:12 UTC
So I wrote my first working ooRexx program (thanks offered to those who helped me over the first hump). Now I'm reading the programmer's guide in a more leisurely fashion, and I've paused to contemplate the ::ROUTINE directive:
"You use the ::ROUTINE directive to create a named routine within a program. The ::ROUTINE directive starts the named routine and another directive (or the end of the program) ends the routine.
"The ::ROUTINE directive is useful organizing functions that are not specific to a particular class type."
Sounds like a procedure to me. What's the difference?
/* Code example */
call routine
exit 0
routine: procedure
say 'Hi, there!'
::ROUTINE routine
say 'Hi, there!'
/* code ends */
In this simplest form, is there any practical difference? (I do see from the definition in the Reference that ::ROUTINE can do other things as well, though I'm still absorbing exactly what those are.)
"You use the ::ROUTINE directive to create a named routine within a program. The ::ROUTINE directive starts the named routine and another directive (or the end of the program) ends the routine.
"The ::ROUTINE directive is useful organizing functions that are not specific to a particular class type."
Sounds like a procedure to me. What's the difference?
/* Code example */
call routine
exit 0
routine: procedure
say 'Hi, there!'
::ROUTINE routine
say 'Hi, there!'
/* code ends */
In this simplest form, is there any practical difference? (I do see from the definition in the Reference that ::ROUTINE can do other things as well, though I'm still absorbing exactly what those are.)