blob: 1293f18397b2ffa9f177899b233a838494dcb2e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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;
}
|