Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Variable variable names - aargh! |
From: | Nathan Dicken |
Date: | Thu, 13 Apr 2000 13:57:01 +0100 |
Hi Glenn,
You code looks good - should no problem as long as the "value1", "value2",
etc... variables are set before they're accessed...
The following test worked fine (but is probably different than what your
script is doing) so all I can think of is that it's maybe a math grouping
thing with the expression 100 * eval("value"&count)/total or something
unrelated to the script...
Set Variable: "total" = "50" // or whatever it may be
Set Variable: "n" = "1"
Loop While (n <= 10)
Set Variable: "value"&n = n
Set Variable: "n" = n+1
End Loop
Set Variable: "count" = "1"
Loop While (count <= 10)
Set Variable: "value"&count = 100 * eval("value"&count)/total
Trace (eval("value"&count))
Set Variable: "count" = count+1
End Loop
Hope that helps...
Nathan Dicken
Fusionary Media
>hi all,
>
>I'm going insane, one tiny little line of code...
>
>I'm trying to convert a list of values to percentages,
>the variable names are "value1", "value2" ... blah blah ...
>
>so anyway, I'm looping through the list using "count" and nothings happening
>
>Set Variable: "value" & count = 100 * Eval("value" & count)/total
>
>
>please help
>--
>
>glenn mitchell
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml
Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Variable variable names - aargh!, Glenn Mitchell
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]