Re: BASIC-to-Euphoria - some inquiries
- Posted by Kat <gertie at PELL.NET> Mar 19, 2002
- 378 views
On 18 Mar 2002, at 23:30, kbochert at ix.netcom.com wrote: > > Hi David Cuny, you wrote on 3/18/02 11:08:48 PM: > > >A GOSUB pushes the address it came from on the return stack, and then > >jumps.. > >When it reaches a RETURN, it returns to the next instruction. Unlike > >function > >calls: > > > > - It goes to a label > > - It keeps the same scope > > - It doesn't pass parameters > > > >-- David Cuny > > > > Sounds trivial, seeing as how I already have goto. It is, but since we have functions and procedures, we don't need the gosub, except as something which disregards the returns, if any. The Basic gosub translation to Eu might be difficult, given the scope of the function is the same as the calling code block. I have arguements for and against sharing scope with gosubs, but i have made good use of nesting procedures and functions inside other procedures and functions, to share scope of non-global vars. This is generally easily solved in Eu with included files though. Kat