function parameters+appendation to name variables? possible?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
ScottG
Posts: 38
Joined: March 19th, 2006, 2:45 am

last question for the weekend, you probably won't hear from me until next saturday. :)

so i can i use a parameter of a function to define a variable, but what if i want to append something to the name of the variable?

eg function(parameter)
{
var parameterComp = subFolder.items.addComp(etc);
var parameterDuration = etc
}

how do i get "Comp" appended to my parameter when declaring this variable? is this possible?
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

Scott,

First, why are you wanting to define variables in this way?

The "parameter" is just the local name for the value that you pass into the function, so if you're wanting names based on it, just type them out as you want. If you're passing in a name (prefix) and you're wanting to create variables with that prefix, there might be a way to do it.

Jeff
ScottG
Posts: 38
Joined: March 19th, 2006, 2:45 am

yes, i was wanting to use the parameter as a prefix for a bunch of variables, but now i'm thinking it'll be easier for me at this stage just to type out all the values as parameters, even though there will be a lot of them.

thanks anyway!
scott.
Post Reply