- Subject: Re: [jed-users] setting programming style
- From: "Klaus Schmid" <klaus.schmid@xxxxxx>
- Date: Fri, 17 Jan 2003 20:42:00 +0100
I wrote:
> Is there any way to avoid eval when assigning to a variable only known by
> it's name string (like with associative arrays)?
define assbyname( keyword, value)
{
if ( keyword == NULL) return @value= $1;
if ( is_defined( keyword) >= 0)
error( "unallowed keyword in "+_function_name);
$1= value;
eval( "assbyname(,&"+keyword+")");
}
Improvements welcome :)
Klaus
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]