Internal suroutines
- Posted by Peter Lynch <plynch49 at hotmail.com> Oct 05, 2003
- 441 views
I intend to generate a considerable amount of code from a Pick environment. The code in the Pick environment has been written with the intention of being exported to another language. There are many issues, one of which i am considering at present. In Pick, there is a language element called GOSUB. This executes a named sub-procedure within the procedure, subroutine or function. It takes no arguments, and uses the current program element's namespace. This named procedure is elsewhere within the procedure - with its detail coded as normal. E.g. Start: Gosub Hello_World Stop Hello_World: Notify_Msg("Hello World") Return This encapsulates inline code in a programmer defined semantic context. Of course, if this structure existed in Euphoria, my conversion would be easy because i dont need to investigate within the namespace in my conversion code. I am wondering if it may be a useful thing to add anyway. It does allow clarification by the decomposition of long sequences of code, without the overhead of argument passing. Regards, Peter