User`s guide

Including M-File Information in Compiler Output
5-35
All Annotation
To i nclude both comments and source code from the source M-file in the
generated output, use
mcc -A annotation:all …
or do not stipulate the annotation o ption, thus using the default of all.
The code snippet contains both comments and source code.
static void Mhello(void) {
mxArray * ans = mclGetUninitializedArray();
/*
* This is the hello, world function written in M code
* $Revision: 1.1 $
*
*/
mclAssignAns(
&ans,
mlfNFprintf(0, mlfScalar(1), mxCreateString("Hello, World\\n"), NULL));
mxDestroyArray(ans);
}
.
.
.
Comments
static void Mhello(void) {
mxArray * ans = mclGetUninitializedArray();
/*
* % This is the hello, world function written in M code
* % $Revision: 1.1 $
* %
* fprintf(1,'Hello, World\n' );
*/
mclAssignAns(
&ans,
mlfNFprintf(0, mlfScalar(1), mxCreateString("Hello, World\\n"), NULL));
mxDestroyArray(ans);
}
.
.
.
Comments
Code