PageRenderTime 23ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/pike/simple/runme.pike

#
Unknown | 20 lines | 16 code | 4 blank | 0 comment | 0 complexity | f7c853bb7d4f8e551cfe517ff7daddc4 MD5 | raw file
 1int main()
 2{
 3    /* Call our gcd() function */
 4    int x = 42;
 5    int y = 105;
 6    int g = .example.gcd(x, y);
 7    write("The gcd of %d and %d is %d\n", x, y, g);
 8
 9    /* Manipulate the Foo global variable */
10    /* Output its current value */
11    write("Foo = %f\n", .example->Foo_get());
12
13    /* Change its value */
14    .example->Foo_set(3.1415926);
15
16    /* See if the change took effect */
17    write("Foo = %f\n", .example->Foo_get());
18    
19    return 0;
20}