Jump to content

Functions: Make New Vars


Recommended Posts

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)

EndFunc

Thanks for reading

PS: 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 by RandomClown
Link to comment
Share on other sites

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 by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...