Function ExecFunction

Top 

 

 

int ExecFunction(char func_name[], int buffer=0, int repetitions=1);

Description:

Perform the specified action (function) on device - programming, blank check, etc. The list of available functions is displayed in the upper left corner of the Program window.

Parameters:

func_name - function name, for example "Blank Check". If you need to execute a function located in the pop-up menu, you should precede the function name with the menu name and separate them with '^' sign, e.g. "Data Memory^Program".

buffer - the buffer number.

repetitions - number of repetitions of the function.

Returned value:

For the value returned by ExecFunction, the header file mprog.h contains two constants:

EF_OK - function was completed successfully

EF_ERROR - there was an error while executing function. In this case, the error description is copied into the built-in variable LastErrorMessage.

 Example:

  if (ExecFunction("Blank Check") != EF_OK)

    printf("Error in blank check: %s", LastErrorMessage);

  See also DialogOnError.