ARexx (14/23)

From:Robert A. Sisk
Date:16 Jul 2001 at 23:05:00
Subject:Re: Final question

On 16-Jul-01 taoberly@mindspring.com <taoberly@mindspring.com> wrote:

> I have a final question for everybody. Is there a way to reuse the j
> variable in this loop when calling a Workbench function, and if not,
> why? j received the length of the first icon name, but is never
> updated in later iterations:

> /* 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

Whoops! Forget my previous advice about drop. The problem is actually
that, on the second and later iteration, the variable j has a numeric
value value instead of its own name. 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'

Kind regards,



Bob
Robert A. Sisk
RSisk@World.STD.Com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of
VeriSign's FREE Guide "Securing Your Web Site for Business." Get it now!
http://www.verisign.com/cgi-bin/go.cgi?a=n094442340008000
http://us.click.yahoo.com/6lIgYB/IWxCAA/yigFAA/saFolB/TM
---------------------------------------------------------------------~->

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/