Shocker1322 Posted June 30, 2008 Posted June 30, 2008 Is it possible to use a string contained within a variable as the variable name itself? For example: CODEDim Array1[2] Dim Array2[2] Func Velocity($Name) $Name = "$Array" & $Name ;Return velocity of array EndFunc Velocity(1) Velocity(2) In the function "Velocity" the string contained within $Name varies. Can the contents of $Name be used as the variable name, or perhaps there is another way to do this? This is just an example of what I am trying to do, the real thing is more complicated. Thank you.
Kerros Posted June 30, 2008 Posted June 30, 2008 You can use Assign Assign ( "varname", "data" [, flag] ) Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now