RandomClown Posted October 29, 2009 Share Posted October 29, 2009 (edited) Hello, I was wondering if it was possible to take a variable name in a function & make a new variable based on the name.======== Details ========// This is an example: Stat($Number) //gives me a new var: $NumberLen Func Stat($Input) - Make Var $NumberLen: $Input + "Len" $Input + "Len"=Len($Input) EndFuncThanks for readingPS: Now that I think of it, this actually seems silly.But since I was wondering in the 1st place, it wouldn't hurt to find out.A good programmer learns new tricks. [at least I should hope so] Edited October 29, 2009 by RandomClown Link to comment Share on other sites More sharing options...
omikron48 Posted October 29, 2009 Share Posted October 29, 2009 Check out Eval and Assign. Link to comment Share on other sites More sharing options...
monoceres Posted October 29, 2009 Share Posted October 29, 2009 (edited) Why do you want to do this? it's a dirty trick that shouldn't be used. There's 100% guarantied a better way to solve your problem. Edit: Also, text looks silly in a monospaced font. Edited October 29, 2009 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
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