omega-mcp
aien-dev/omega-mcp
Brought by drakestapleton
omega-mcp / data / examples / structs.om
| 1 | note a struct on the stack, field get and put, sizeof and offsetof |
| 2 | struct Pt x long y long end |
| 3 | fn main to int |
| 4 | p = new Pt 3 4 |
| 5 | put p x add get p x 10 |
| 6 | s = add get p x get p y |
| 7 | z = add sizeof Pt offsetof Pt y |
| 8 | ret int add s long z |
| 9 | end |