Mercurial > projects > dang
view tests/code/array_1.d @ 96:438e6ed4cda1 new_gen
Now D-Mangling the function types. Still need to mangle "scopes" - by that i mean structs, classes and modules.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Tue, 06 May 2008 18:51:08 +0200 |
parents | 9f66771fb1a3 |
children | 857f0d530789 |
line wrap: on
line source
struct Array { int[] data; int length; } void insert(Array a, int v) { a.length = a.length + 1; a.data[a.length - 1] = v; } int main() { Array a; a.length = 0; insert(a, 5); return a.data[0]; }