omega-harness
Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories
Brought by drakestapleton
omega-harness / skills / omega-encoding / examples / pitfall_shared_name.om
| 1 | note Units concatenated into one input share one namespace: the local sh below names the |
| 2 | note global array sh of the unit above it, so the assignment is a type error (error 7). |
| 3 | global sh uchar 4 |
| 4 | fn seta to void |
| 5 | put sh 0 uchar 5 |
| 6 | end |
| 7 | fn helpb x ulong to ulong |
| 8 | sh = add x 1 |
| 9 | ret sh |
| 10 | end |
| 11 | fn main to int |
| 12 | seta |
| 13 | ret int add ulong get sh 0 helpb 1 |
| 14 | end |