Mercurial > octave-nkf
annotate examples/myfunc.c @ 18087:d734216aa2b1 stable rc-3-8-0-1
3.8.0 release candidate 1
* configure.ac (OCTAVE_VERSION): Bump to 3.8.0-rc1.
(OCTAVE_API_VERSION_NUMBER): Set to 49.
(OCTAVE_RELEASE_DATE): Set to 2013-12-04.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Dec 2013 15:40:33 -0500 |
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 } |