omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / qualification / om2 / sec / s5s7 / l5-scalar.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note contract 5 layout lines 154, 158 with erratum E5: a field with COUNT omitted is a scalar, |
| 3 | note written `put c F v` and read `get c F` without an index. stdout: 01 02 03 04, then 0000000001020304 (exp/l5-scalar.out). |
| 4 | om2 |
| 5 | layout one 4 |
| 6 | field v uint at 0 big |
| 7 | end |
| 8 | fn fill x edit one to void |
| 9 | put x v 0x01020304 |
| 10 | end |
| 11 | fn show x view one to void |
| 12 | puth ulong get x v |
| 13 | end |
| 14 | fn main to int |
| 15 | c = new uchar 4 0 |
| 16 | fill c |
| 17 | w = write 1 c 0 4 |
| 18 | show c |
| 19 | ret 0 |
| 20 | end |