bat/tests/syntax-tests/highlighted/D/test.d
2020-10-24 12:28:15 +02:00

24 lines
3.0 KiB
D
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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());
}