MATLAB COMPILER RELEASE NOTES User's Guide Page 148

  • Download
  • Add to my manuals
  • Print
  • Page
    / 264
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 147
5 Controlling Code Generation
5-32
Default Indentation
Not specifying indent formatting options uses the default of four spaces for
statements and two spaces for expressions. For example, using
mcc -x gasket
generates the following code segment.
012345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
void mlxGasket(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
mxArray * mprhs[1];
mxArray * mplhs[1];
int i;
if (nlhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: gasket Line: 1 Column: "
"1 The function \"gasket\" was called with mor"
"e than the declared number of outputs (1)."));
}
if (nrhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: gasket Line: 1 Column: "
"1 The function \"gasket\" was called with mor"
"e than the declared number of inputs (1)."));
}
for (i = 0; i < 1; ++i) {
mplhs[i] = mclGetUninitializedArray();
}
for (i = 0; i < 1 && i < nrhs; ++i) {
mprhs[i] = prhs[i];
}
for (; i < 1; ++i) {
mprhs[i] = NULL;
}
mlfEnterNewContext(0, 1, mprhs[0]);
mplhs[0] = Mgasket(nlhs, mprhs[0]);
mlfRestorePreviousContext(0, 1, mprhs[0]);
plhs[0] = mplhs[0];
}
Page view 147
1 2 ... 143 144 145 146 147 148 149 150 151 152 153 ... 263 264

Comments to this Manuals

No comments