Re: Discuss changing the behaviour of append()
- Posted by petelomax Jun 16, 2014
- 4068 views
jimcbrown said...
Ok, I've now implemented a prototype implementation at http://scm.openeuphoria.org/hg/euphoria/rev/b49d88483f04
3.1 --- a/source/execute.e Tue Jun 10 20:31:17 2014 -0400
3.2 +++ b/source/execute.e Sun Jun 15 18:33:11 2014 -0400
3.3 @@ -2965,7 +2965,11 @@
3.4 a = Code[pc+1]
3.5 b = Code[pc+2]
3.6 target = Code[pc+3]
3.7 + if atom(val[a]) then
3.8 + val[target] = append({val[a]}, val[b])
3.9 + else
3.10 val[target] = append(val[a], val[b])
3.11 + end if
3.12 pc += 4
3.13 end procedure
That should be unnecessary, unless you need execute.e to run on previous versions of OE
Pete

