Gary;

Yes, what is preceived as ugly is often powerful.  This is the construction
of the called routine with the name of the argument(s) dynamically
generated.  I say argument(s) because VarName could be of a form,
"P1,P2,.P3" and is the routine was constructed properly, then the argument
list would have been;  D MyFunct2(.P1,P2,.P3)  Now we hope everyone has read
ahead and knows about the period in front of P1 and P3.  These are "call by
name" an not "call by value" as is P2.  Results can be returned via P1 and
P3, but only the value of P2 is exposed.  Has that sufficiently confused
everyone?  Confusion is the beginning of enlightenment.


----- Original Message -----
From: "Gary Monger" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 27, 2006 5:49 AM
Subject: RE: [Hardhats-members] Parameter passing by reference vs. by name


> There's also D @("MyFunct2(."_VarName_")")
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Gregory
> Woodhouse
> Sent: Thursday, January 26, 2006 9:37 PM
> To: [email protected]
> Subject: Re: [Hardhats-members] Parameter passing by reference vs. by name
>
>
> On Jan 26, 2006, at 5:57 PM, Kevin Toppenberg wrote:
>
>
> > ...
> >
> > So I have written some functions using both calling methods, and I
> > have just now had reason to call one from another.
> > I know that I could create a new array, merge it, pass that array,
> > then when the function returns merge it back.  But, is there a way to
> > do this directly--i.e. achieve my erroneous line listed above, perhaps
> > with different syntax?
> >
> > Thanks
> > Kevin
> >
> >
>
>
> Interesting question! It seems that $NAME really has no inverse. One
> possibility would be to construct a line of code on the fly and
> execute it. For example, if the VAR="X" and you want pass the
> variable with VAR as its name as a reference parameter (say that
> three times fast), you could do this
>
> SET CMD="D TAG(."_VAR_")" X CMD
>
> (I agree that it's an ugly solution.)
>
> ===
> Gregory Woodhouse
> [EMAIL PROTECTED]
>
> "Education is a progressive discovery
> of our own ignorance."
> --Will Durant
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Hardhats-members mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Hardhats-members mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
>
>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to