#define
Identifier Literal- Modifies the translation unit
- Identifier#1 is replaced by Literal#1
#undef
Identifier- Behaves as
#define
Identifier#1 $empty
- Behaves as
#ifdef
Identifier
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.stdio; | |
import std.experimental.allocator : IAllocator, processAllocator; | |
import memmgr; | |
void main() { | |
writeln("START1"); | |
func(); | |
writeln("END2"); | |
} |
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
int callbackGetWindows(HWND hwnd, LPARAM lParam) nothrow { | |
import std.experimental.ui.internal.window; | |
GetWindows* ctx = cast(GetWindows*)lParam; | |
if (!IsWindowVisible(hwnd)) | |
return true; | |
RECT rect; | |
GetWindowRect(hwnd, &rect); |
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
module dcf.phase1; | |
import std.range.interfaces : InputRange; | |
final class DCFPhase1 : InputRange!char { | |
private { | |
InputRange!char source; | |
char next; | |
byte bufLeft; |
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
module diff; | |
struct Diff { | |
import std.utf : validate; | |
import std.experimental.allocator : IAllocator, dispose, makeArray, expandArray; | |
bool treatingAsBinary; | |
ubyte[] diff; |
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
Building package alphacodegen:lang_d in /home/rikki/projects/alphacodegen/ | |
Performing "unittest" build using dmd for x86_64. | |
pegged 0.3.2: target for configuration "library" is up to date. | |
alphacodegen:lang_d ~master: building configuration "application"... | |
Linking... |
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
var color; | |
def init(myColor) { | |
color = myColor; | |
} | |
def draw() { | |
var startx, starty, endx, endy; | |
startx = Widget.x; | |
starty = Widget.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
struct Experiments { | |
Experiment[] sets; | |
} | |
struct Experiment { | |
string fileName; | |
string endCondition; | |
Variation[] variations; | |
bool doesTurtlesMove; | |
} |