 |
megamog75 Enchanter

Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Fri Feb 20, 2004 3:31 am
Variable expression problem 7.0 |
Tried to get this to work with no luck:
#var scline {big|red|dog}
#loop 1,%numitems(@scline) {#var var %left(%item(@scline,%i),1);#show @@var}
tried this too
#forall @scline {#show @%left(%i,1)}
the screen in both of these just showed
@b
@r
@d
wanted to see what was in the vars.
Am I missing something, will try to find another way just thought you guys might know something about it. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Feb 20, 2004 4:51 am |
That's not the correct syntax. If you want to use indirect evaluation and display a variable who's name is also a variable or function, the correct syntax is:
#SHOW @{%left(%i,1)}
or, more generally:
@{expression}
So in your first example, it would be #SHOW @{@var} |
|
|
|
 |
megamog75 Enchanter

Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Fri Feb 20, 2004 2:51 pm |
Thank You :)
|
|
|
|
 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|