mexAtExit

Register a function to be called when the MEX-file is cleared or when Nelson exits

Syntax

  • #include "mex.h"

  • int mexAtExit(void (*ExitFcn)(void));

Input argument

  • ExitFcn - Pointer to function you wish to run on exit.

Output argument

  • returned value - returns 0.

Description

Each MEX can register only one active exit subroutine at a time.

mexAtExit registers a subroutine to be called just when Nelson is finished or clear is called.

Example

edit([modulepath('mex', 'tests'), '/test_mexAtExit.m'])

See also

exit, clear.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated