This file contains 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
Profiling Mono-D git debug build (aborted before Mono-D finished) | |
Mono log profiler data | |
Profiler version: 0.4 | |
Data version: 4 | |
Mean timer overhead: 88 nanoseconds | |
Program startup: Tue Feb 26 13:55:27 2013 | |
Program ID: 17730 | |
Server listening on: 55643 |
This file contains 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, std.stdio, std.conv; | |
void main() { | |
auto f = feet(10); | |
auto m = meter(10.0); // kan fint bruke desimaltall | |
// en type til en annen - konvertering | |
auto feetMeter = f + m; | |
assert( feetMeter.siunit == "feet" ); | |
assert( feetMeter >= feet(42.808) && |
This file contains 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
/* Written in the D Programming Language (D2) | |
* | |
* http://projecteuler.net/index.php?section=problems&id=1 | |
* | |
* If we list all the natural numbers below 10 that are multiples of 3 or 5, we | |
* get 3, 5, 6 and 9. The sum of these multiples is 23. | |
* | |
* Find the sum of all the multiples of 3 or 5 below 1000. | |
*/ |