Mercurial > hg > octave-nkf
annotate examples/myfunc.c @ 19181:0b657f4e7780 gui-release
maint: Merge stable to gui-release.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 05 Aug 2014 17:51:47 -0700 |
parents | 224e76250443 |
children |
rev | line source |
---|---|
6580 | 1 #include "mex.h" |
2 | |
3 void | |
16867
be41c30bcb44
Re-write documentation and all examples of dynamically linked functions.
Rik <rik@octave.org>
parents:
9932
diff
changeset
|
4 mexFunction (int nlhs, mxArray *plhs[], |
be41c30bcb44
Re-write documentation and all examples of dynamically linked functions.
Rik <rik@octave.org>
parents:
9932
diff
changeset
|
5 int nrhs, const mxArray *prhs[]) |
6580 | 6 { |
7 const char *nm; | |
16867
be41c30bcb44
Re-write documentation and all examples of dynamically linked functions.
Rik <rik@octave.org>
parents:
9932
diff
changeset
|
8 |
6580 | 9 nm = mexFunctionName (); |
6581 | 10 mexPrintf ("You called function: %s\n", nm); |
6580 | 11 if (strcmp (nm, "myfunc") == 0) |
6581 | 12 mexPrintf ("This is the principal function\n", nm); |
16867
be41c30bcb44
Re-write documentation and all examples of dynamically linked functions.
Rik <rik@octave.org>
parents:
9932
diff
changeset
|
13 |
17791
224e76250443
Use GNU style coding conventions for code in examples/
Rik <rik@octave.org>
parents:
16867
diff
changeset
|
14 return; |
6580 | 15 } |