Jump to content

Passing function names as parameters


Sam137
 Share

Recommended Posts

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.

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...