diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-07 02:18:26 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-07 02:18:26 +0200 |
| commit | ae5fee63f160643a397d18e9e0658275606bc4d4 (patch) | |
| tree | f68af302374f9ae3c9dbb28dab5547036252d559 /examples/numeral.ct | |
| download | ek-ae5fee63f160643a397d18e9e0658275606bc4d4.tar.gz ek-ae5fee63f160643a397d18e9e0658275606bc4d4.zip | |
initial commit
Diffstat (limited to 'examples/numeral.ct')
| -rw-r--r-- | examples/numeral.ct | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/numeral.ct b/examples/numeral.ct new file mode 100644 index 0000000..38936e9 --- /dev/null +++ b/examples/numeral.ct @@ -0,0 +1,35 @@ +/* good optimisation target: make these built in */ +type numeral { + u8; + u16; + u32; + u64; + i8; + i16; + i32; + i64; + isize; + usize; + float; + double; +} + +pub init(mut a *numeral) +{ + *a = 0; +} + +pub deinit(mut a *numeral) +{ + *a = 0; +} + +pub copy(mut a *numeral, b *numeral) +{ + *a = *b; +} + +pub move(mut a *numeral, mut b *numeral) +{ + *a = *b; +} |
