Jump to content
Sign in to follow this  
Kiti

Eval() a function

Recommended Posts

Kiti

Hello everyone!

Here's a piece of non-working code:

for $i = 1 to 3
eval("f" & $i)
next

func f1()
    msgbox(0,"",1)
EndFunc

func f2()
    msgbox(0,"",2)
EndFunc

func f3()
    msgbox(0,"",3)
EndFunc

I think you've already understood what I want to do. I have three functions, called f1, f2 and f3, and I want to be able to call them by something similar to the eval function, so the script will count up to 3. How do I do that? :)

Share this post


Link to post
Share on other sites
monoceres

Call() function. Look it up in the help file.

:)


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

Share this post


Link to post
Share on other sites
Kiti

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.