PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/d/simple/d1/runme.d

#
D | 27 lines | 12 code | 6 blank | 9 comment | 0 complexity | 8b10ebcdd11c6c5bda0ed90e7df4a7cc MD5 | raw file
 1module runme;
 2
 3import tango.io.Stdout;
 4static import example;
 5
 6void main() {
 7  /*
 8   * Call our gcd() function.
 9   */
10  int x = 42;
11  int y = 105;
12  int g = example.gcd( x, y );
13  Stdout.format( "The gcd of {} and {} is {}.", x, y, g ).newline;
14
15  /*
16   * Manipulate the Foo global variable.
17   */
18
19  // Output its current value
20  Stdout.format( "Foo = {}", example.Foo ).newline;
21
22  // Change its value
23  example.Foo = 3.1415926;
24
25  // See if the change took effect
26  Stdout.format( "Foo = {}", example.Foo ).newline;
27}