swig/Examples/octave/contract/runme.m
Sylvestre Ledru 21e17eaa73 Merge remote-tracking branch 'origin/master' into gsoc2012-scilab
Conflicts:
	Examples/Makefile.in
2013-08-06 10:06:31 +02:00

21 lines
387 B
Matlab

# file: runme.m
swigexample
# Call our gcd() function
x = -2;
y = 105;
g = swigexample.gcd(x,y);
printf("The gcd of %d and %d is %d\n",x,y,g);
# Manipulate the Foo global variable
# Output its current value
printf("Foo = %f\n", swigexample.cvar.Foo);
# Change its value
swigexample.cvar.Foo = 3.1415926;
# See if the change took effect
printf("Foo = %f\n", swigexample.cvar.Foo);