aienos.com
Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
aienos.com / om / omega-reference / vendor / skills / omega-encoding / examples / trap_narrow.om
| 1 | note edge: narrowing a value that does not fit traps 5, so the program exits 105 |
| 2 | note the masked store on line 6 is fine (300 and 255 = 44); the unmasked store on line 7 traps |
| 3 | global b uchar 2 |
| 4 | fn main to int |
| 5 | x = uint 300 |
| 6 | put b 0 uchar and x 255 |
| 7 | put b 1 uchar x |
| 8 | ret int get b 0 |
| 9 | end |