----- Original Message -----
From: "Majorinc, Kazimir" <[EMAIL PROTECTED]>
To: "uniconGroup" <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 11:49 PM
Subject: Re: [Unicon-group] Co-expressions Keep Too Much Information
> Perhaps this can work:
>
> variable("x"):=sqrt(2)
>
> (although, unfortunately, x has to be "declared" somewhere in procedure.)
I've tried this, and found that this does work! If we have
local x
...
coexp1 := create {
...
variable("x"):=sqrt(2)
...
}
then the activation / reactivation of coexp1 will assign to the copy of x in
coexp1, even if the activation occurs in a procedure that does not have a
local variable named x.
An approach that does NOT work is
local x
...
coexp1 := create ( ..., variable("x" ) )
...
@coexp1 := sqrt(2) # Runtime Error! Left side of assignment is not a
variable
When I tried this code, I first thought that the problem was that the
variable function was returning the dereferenced value of the variable,
instead of the variable reference. Further testing and NG / mailing list
discussions revealed that the real problem is that co-expression return
values, like procedure return values, are dereferenced if the value is a
dynamic variable.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group