PageRenderTime 40ms CodeModel.GetById 17ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. module runme;
  2. import tango.io.Stdout;
  3. static import example;
  4. void main() {
  5. /*
  6. * Call our gcd() function.
  7. */
  8. int x = 42;
  9. int y = 105;
  10. int g = example.gcd( x, y );
  11. Stdout.format( "The gcd of {} and {} is {}.", x, y, g ).newline;
  12. /*
  13. * Manipulate the Foo global variable.
  14. */
  15. // Output its current value
  16. Stdout.format( "Foo = {}", example.Foo ).newline;
  17. // Change its value
  18. example.Foo = 3.1415926;
  19. // See if the change took effect
  20. Stdout.format( "Foo = {}", example.Foo ).newline;
  21. }