Initial commit of Octave module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10290 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
50b1578e19
commit
393391965c
275 changed files with 14004 additions and 5 deletions
24
Examples/octave/funcptr2/runme.m
Normal file
24
Examples/octave/funcptr2/runme.m
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# file: runme.m
|
||||
|
||||
example
|
||||
|
||||
a = 37
|
||||
b = 42
|
||||
|
||||
# Now call our C function with a bunch of callbacks
|
||||
|
||||
printf("Trying some C callback functions\n");
|
||||
printf(" a = %i\n", a);
|
||||
printf(" b = %i\n", b);
|
||||
printf(" ADD(a,b) = %i\n", example.do_op(a,b,example.ADD));
|
||||
printf(" SUB(a,b) = %i\n", example.do_op(a,b,example.SUB));
|
||||
printf(" MUL(a,b) = %i\n", example.do_op(a,b,example.MUL));
|
||||
|
||||
printf("Here is what the C callback function objects look like in Octave\n");
|
||||
example.ADD
|
||||
example.SUB
|
||||
example.MUL
|
||||
|
||||
printf("Call the functions directly...\n");
|
||||
printf(" add(a,b) = %i\n", example.add(a,b));
|
||||
printf(" sub(a,b) = %i\n", example.sub(a,b));
|
||||
Loading…
Add table
Add a link
Reference in a new issue