This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
real x = 3.14159265358979323846364e300; | |
double y = -3.14159265358979323846364e3000L; | |
float z = -3.14159265358979323846364e30; | |
writefln ("x = %.1g",x); | |
writefln ("y = %.2f",y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
string[] f(string s) | |
{ | |
return s.map!(_ => [_,'-'].to!string).array; | |
} | |
writeln(f("Hello")); // extected output: ["H-","e-","l-","l-","o-"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
int value = 05; | |
writeln("Is between: ", | |
(value >= 10) && (value < 20)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
struct Color | |
{ | |
/// Color red value | |
ubyte r; | |
/// Color green value | |
ubyte g; | |
/// Color blue value | |
ubyte b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.traits; | |
import std.meta; | |
import std.typecons; | |
import std.stdio; | |
import std.conv; | |
import std.array; | |
import std.algorithm.iteration : map, joiner; | |
import std.ascii; | |
import std.string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private | |
{ | |
import std.algorithm; | |
import std.conv; | |
import std.range; | |
import std.stdio; | |
import std.string; | |
import std.traits; | |
auto propertyGenerator(string name, string type) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() | |
{ | |
import std.algorithm, std.stdio; | |
"Starting program".writeln; | |
int[] a = new int[5]; | |
a = [1, 5, 3, 6, 9]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.algorithm; | |
import std.stdio, std.json; | |
void main() | |
{ | |
enum kıstas = "a < b"; | |
auto okulum = SIRALA!long(veri, "OKUL"); | |
// The source of the sorted data-^ root-^ | |
okulum.school!kıstas.writeln; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.algorithm; | |
import std.stdio, std.json; | |
void main() | |
{ | |
enum kıstas = "a < b"; | |
auto okulum = SIRALA!long(veri, "OKUL"); | |
// The source of the sorted data-^ root-^ | |
okulum.school!kıstas.writeln; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.algorithm; | |
import std.stdio, std.json; | |
void main() | |
{ | |
enum kıstas = "a < b"; | |
auto okulum = SIRALA!long(veri, "OKUL"); | |
// The source of the sorted data-^ root-^ | |
okulum.school!kıstas.writeln; |