omega-harness
Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories
Brought by drakestapleton
omega-harness / examples / empty_text_part.om
| 1 | note empty_text_part: known defect at the pin (omega-mv #775): an empty text passed to an unsized view |
| 2 | note does not arrive with len 0. Workaround, shown here: pass part e 0 0, which arrives with len 0 |
| 3 | om2 |
| 4 | text e "" |
| 5 | text f "0123456789abcdef0123456789abcdef" |
| 6 | fn n a view uchar * to ulong |
| 7 | ret len a |
| 8 | end |
| 9 | fn main to int |
| 10 | k = n part e 0 0 |
| 11 | if ne k 0 |
| 12 | ret 1 |
| 13 | end |
| 14 | m = n f |
| 15 | if ne m 32 |
| 16 | ret 2 |
| 17 | end |
| 18 | ret 0 |
| 19 | end |