/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
- module runme;
- import tango.io.Stdout;
- static import example;
- void main() {
- /*
- * Call our gcd() function.
- */
- int x = 42;
- int y = 105;
- int g = example.gcd( x, y );
- Stdout.format( "The gcd of {} and {} is {}.", x, y, g ).newline;
- /*
- * Manipulate the Foo global variable.
- */
- // Output its current value
- Stdout.format( "Foo = {}", example.Foo ).newline;
- // Change its value
- example.Foo = 3.1415926;
- // See if the change took effect
- Stdout.format( "Foo = {}", example.Foo ).newline;
- }