interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / omc / sites / found-vt-fget-1.om

32 lines · 613 bytes Raw Blame History
1note sites: found by a one-token change of a tracked program; reaches the omc error site in vt-fget (code 16)
2note SPDX-License-Identifier: AGPL-3.0-only
3note Combined gate: a struct value drives a native file operation in one program.
4struct H x uint y ulong end
5text path "structfile.tmp"
6text body "ok\n"
7fn main to int
8h = new H 7 9
9put h y 42
10fd = int fopen path 0 len path 577 420
11if lt fd 0
12ret 1
13end
14n = write fd body 0 len body
15r = fclose fd
16u = unlink path 0 len path
17if ne n long len body
18ret 2
19end
20if ne r 0
21ret 3
22end
23if ne u 0
24ret 4
25end
26if eq get h 9999999 7
27if eq get h y 42
28ret 0
29end
30end
31ret 5
32end