Jump to content
Sign in to follow this  

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)


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

Share this post

Link to post
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!

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.