Re: Pass by Reference
- Posted by mattlewis (admin) Jan 15, 2015
- 2212 views
petelomax said...
{ op, size, scale, index, base, offset } = get_operand(P_MEM)
In Phix, you get a fatal error if there aren't enough values, whereas OpenEuphoria just quietly leaves some values as-is, and on both, no messages if there are too many.
Not true (about openeuphoria) unless I'm misunderstanding you:
-- test.ex without inline function foo() return {1, 2, 3} end function object a, b, c, d {a, b, c, d } = foo()
$ eui test test.ex:10 subscript value 4 is out of bounds, reading from a sequence of length 3 test.ex:10 Segmentation fault (core dumped)
It's so much of an error that you get a segfault! Hmm....need to look into that.
Matt