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 / omc / om2 / s1 / kw-long-field.om
| 1 | note S1: a struct field of 9..63 bytes whose first 8 bytes spell a keyword (continue_x) is a field name, |
| 2 | note not the keyword, and is told apart in full from continue_y. Exit 0, else the failing check's number. |
| 3 | struct S continue_x ulong continue_y ulong end |
| 4 | fn main to int |
| 5 | s = new S 3 4 |
| 6 | if ne get s continue_x 3 |
| 7 | ret 1 |
| 8 | end |
| 9 | put s continue_y 5 |
| 10 | if ne get s continue_y 5 |
| 11 | ret 2 |
| 12 | end |
| 13 | if ne get s continue_x 3 |
| 14 | ret 3 |
| 15 | end |
| 16 | ret 0 |
| 17 | end |