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 / effects / cases / files.om

17 lines · 309 bytes Raw Blame History
1note files: create, stat and remove one file in the current directory.
2text nm "effects.tmp"
3fn main to int
4fd = int fopen nm 0 len nm 578 384
5if lt fd 0
6ret 1
7end
8w = write fd nm 0 len nm
9st = new uchar 128 0
10r = fstat fd st 0 128
11c = fclose fd
12u = unlink nm 0 len nm
13if or ne r 0 ne u 0
14ret 2
15end
16ret 0
17end