Jump to content
Sign in to follow this  
Sam137

Passing function names as parameters

Recommended Posts

Sam137

Hello all

I have a code the following code:

Main Code:

*******************************

$NextTest = "MulMovAllNotExistEnc()"

_RunLoadData1($UpdateStatus3, $LoadINI, $UpdateStatus4,$StartStep,$EndStep,$CurrTest,$NextTest)

*********************************

Here MulMovAllNotExistEnc() is the name of the function.

Func MulMovAllNotExistEnc()

Msgbox(0,"","I am here")

EndFunc

Called fuction Code:

******************************

Func _RunLoadData1($UpdateStatus3, $LoadINI1, $UpdateStatus4,$StartStep,$EndStep,$CurrTest,$NextTest)

if $StrMessage = 0 Then ; Lets keep some condition is not satisfied

MsgBox(16,"Message Not Found","Step 5 was failing in "& $CurrTest & " test, hence continuing with next test")

$NextTest

EndFunc

******************************

Problem:

When the code passes through the if loop, it should call the MulMovAllNotExistEnc() function. Its giving the error. Can you please help.

Share this post


Link to post
Share on other sites
somdcomputerguy

So what is $StrMessage? If you want to check if $StrMessage is an empty string, use '' (two single quotes) or "" (two double quotes) instead of 0 (zero).


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
hannes08

Sam137,

what you are looking for is the "Call()" function. Look it up in the helpfile.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

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.