Compounds variables

Arlindo da Silva arlindo.dasilva at GMAIL.COM
Mon Jan 25 12:25:12 EST 2010


On Mon, Jan 25, 2010 at 12:25 AM, Jason Snyder <jmssnyder at ucdavis.edu>wrote:

> I am working with compound variables as described in the below website:
>
> http://www.iges.org/grads/gadoc/script.html#while
>
> Here is the script:
>
> 'xdfopen uninan.ctl'
> 'set gxout shaded'
> 'set t 1'
> 'define temp=U'
> i=1
> count=1
> While(i<5)
>     count=count+2
>     say count
>    'set t 'i
>     dtx.count=U
>    'd dtx.count'
>     i=i+1
> endwhile
> How do I display the compound variables or make calculations w/ them?
>
>

This is usually a confusing aspect of grads to many newcomers. The grads
script language and the expression parser are separate, they do not share
the same namespace. For example, when you say

dtx.count=U

you are mixing namespaces. U belongs to expression parser namespace while
dtx.count belongs to the script namespace; this is not allowed.

    Arlindo




> Thanks,
>
> Jason
>



-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100125/027d4f0c/attachment.html 


More information about the gradsusr mailing list