perkeyone
something clever
- Reaction score
- 71
is it possible to make a function which will create a variable with a specified or unspecified name?
for example, lets say i want a function which when called will make a new variable and name it with an underscore followed by the date and time it was made. "_jan5,2010@00:43"
then i could set the value of _jan5,2010@00:43 to anything i want
another example, lets say i want to make a function which takes a string as a parameter, then creates a variable by that name.
such that i could do something like this
newVar("dog")
dog=0
for example, lets say i want a function which when called will make a new variable and name it with an underscore followed by the date and time it was made. "_jan5,2010@00:43"
then i could set the value of _jan5,2010@00:43 to anything i want
another example, lets say i want to make a function which takes a string as a parameter, then creates a variable by that name.
such that i could do something like this
newVar("dog")
dog=0