MATLAB COMPILER RELEASE NOTES Guía de usuario Pagina 148

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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];
}
Vista de pagina 147
1 2 ... 143 144 145 146 147 148 149 150 151 152 153 ... 263 264

Comentarios a estos manuales

Sin comentarios