PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/octave/contract/runme.m

#
Objective C | 22 lines | 14 code | 8 blank | 0 comment | 1 complexity | 227ee0ac53d4599d66c325c57f80b4cd MD5 | raw file
 1# file: runme.m
 2
 3example 
 4
 5# Call our gcd() function
 6
 7x = 42;
 8y = 105;
 9g = example.gcd(x,y);
10printf("The gcd of %d and %d is %d\n",x,y,g);
11
12# Manipulate the Foo global variable
13
14# Output its current value
15printf("Foo = %f\n", example.cvar.Foo);
16
17# Change its value
18example.cvar.Foo = 3.1415926;
19
20# See if the change took effect
21printf("Foo = %f\n", example.cvar.Foo);
22