Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Cadence > Re: SKILL Q: C...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3954 of 4209
Post > Topic >>

Re: SKILL Q: Coaxing a Symbol to Give Up Its Value Without UsingEVAL?

by Andrew Beckett <andrewb@[EMAIL PROTECTED] > Apr 30, 2008 at 11:01 AM

S. Badel wrote, on 04/17/08 00:05:
>> Anyone who has glanced at the Cadence SKILL do***entation knows the
>> use of eval() is a no-no.  But there are situations in which one binds
>> a value to a symbol and then p***** the QUOTED symbol around before
>> finally needing the actual value associated with the symbol.  What
>> other ways can one get at a symbol's value besides using eval()?
> 
> symeval() does precisely this. But I don't think the end result is any 
> different from using eval().
> 
> I do not see any problems with eval() myself, though.
> 
> Cheers,
> Stéphane

It's preferrable to avoid eval() because:

a) it means you're doing run-time evaluation - this means you're not
taking
    advantage of the byte-code compilation which will improve speed
b) you need to be particularly careful when using SKILL++ code because
    of it needing to understand the scope you're in.

symeval() to some extent is similar, but it's really just looking up a
symbol value, so that's not so costly.

However, often you'd be better off using a macro.

See my previous posting http://tinyurl.com/5wx3y7

Andrew.
 




 3 Posts in Topic:
SKILL Q: Coaxing a Symbol to Give Up Its Value Without Using EV
Edward <edward.dodge@[  2008-04-16 13:24:15 
Re: SKILL Q: Coaxing a Symbol to Give Up Its Value Without Usin
"S. Badel" <  2008-04-17 01:05:31 
Re: SKILL Q: Coaxing a Symbol to Give Up Its Value Without Usin
Andrew Beckett <andrew  2008-04-30 11:01:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 16:01:14 CDT 2008.