mirror of https://github.com/sharkdp/bat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
408 B
D
24 lines
408 B
D
import std.stdio;
|
|
import std.algorithm;
|
|
import std.range;
|
|
|
|
/* a multiline comment
|
|
*
|
|
*/
|
|
int the_ultimate_answer() {
|
|
return 42;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
// function call with string literal
|
|
writeln("Hello World!");
|
|
|
|
// an int array declaration
|
|
int[] arr1 = [1, 2, 3];
|
|
// a double
|
|
double d1 = 3.14;
|
|
// another function call
|
|
writefln("%s\n%s\n%s\n", arr1, d1, the_ultimate_answer());
|
|
}
|