From: | taoberly |
Date: | 17 Jul 2001 at 02:23:17 |
Subject: | Re: Final question |
Hi Robert,
--- In arexx@y..., "Robert A. Sisk" <RSisk@w...> wrote:
> On 16-Jul-01 taoberly@m... <taoberly@m...> wrote:
> > /* Icon test */
>
> > ADDRESS WORKBENCH
>
> > GETATTR window.icons.all.count NAME root VAR last_icon
> > GETATTR window.icons.all NAME root STEM icon
>
> > DO i = 0 to last_icon-1
> > GETATTR application.font.icon.size NAME '"'icon.i.name'"' VAR j
> > SAY icon.i.name" text is "j" pixels long"
> > END
> The problem is actually
> that, on the second and later iteration, the variable j has a numeric
> value value instead of its own name.
Okay so far...
> That's what happens when you include
> a variable in a command where you intend a constant. Try this version of
> the command instead:
>
> 'getattr application.font.icon.size name "'icon.i.name'" var J'
Ah, so the problem was that instead of assigning the new value, Arexx
was substituting the exisiting value (as it would do under normal
circumstances) before it could evaluate the function? The quotes
forgo any substitution until it has a chance to "look inside". I
think I understand. But why is caps necessary? (I tried lowercase
and realize that does not work.) I suppose it has something to do
with Arexx automatically turning lowercase values to caps...
Thanks for the help. It works fine now, and the remaining hurdles are
quickly diminishing. Alfonso was even kind enough to bang-out a new
version of rmh.library. ;-)
Thanks,
Todd
ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/