> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Wendy Smoak
> Sent: Wednesday, June 22, 2005 8:47 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Custom Functions
> 
<--- snip ---> 

> We consider subroutines fairly "expensive" in terms of system 
> resources,
> and tend to just use GOSUB within most programs.  But coming from the
> Java/OO world, the global variables are *killing* me.  And I'm partial
> to the nested parenthesis notation as well.
> 

I always thought that if you have a globally catalogued subroutine and use it 
like this:

MY.SUB = '*MY.SUB'

CALL @MY.SUB(parm1,parm2...)

What happens under the hood, must be that the compiled subroutine is loaded 
into a variable, and that variable is either placed somewhere on the stack or 
another area, and the way a function works is the same way, just with another 
syntax.. ??

that would take the exact same amount of clock cycles to reach the subroutine 
as a call to a function would
A function is also 'just' a loaded subroutine, so in effect the runtime does a 
longjump to the routine..



Am i totally wrong on this ??


best regards from 'melted down' denmark

Claus Derlien

Frie Funktionfrer - faglig organisation og tvfrfaglig a-kasse - www.f-f.dk

***************************************************************************************************************************************
Denne email og alle filer vedlagt som bilag kan indeholde fortroligt materiale, 
der kun er beregnet for adressaten,
og maa ikke udleveres eller kopieres til uvedkommende. Har De ved en 
fejltagelse modtaget denne email, bedes
De venligst omgaaende meddele os dette pr. telefon : 6313 8550. Paa forhaand 
tak.
***************************************************************************************************************************************
This email and any files transmitted with it may contain confidential 
information intended for the addressee(s) only.
The information is not to be surrendered or copied to unauthorised persons. If 
you have received this
communication in error, please notify us immediately by telephone: +45 6313 
8550. Thank you.
***************************************************************************************************************************************
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to