Pastey {x, y} or {{x, y}} runnable example
- Posted by local2 Mar 22, 2012
--ONE
include std\console.e
with trace
trace(1)
integer aWholeNumber = 1
atom aFloat = 1.999999
sequence aSequence = {3, 4}
sequence result = {}
function addmultret(integer first, atom second, sequence third)
return (first + second + third[1]) + third[2] & (first * second * third[1]) * third[2]
end function
result = addmultret(aWholeNumber, aFloat, aSequence) --note this difference result = (returned sequence) when result = {}
any_key()
--TWO
result = {0}
result[1] = addmultret(aWholeNumber, aFloat, aSequence) --note this difference result = (same returned sequence) when result = {0}
any_key()1. Comment by local2 Mar 22, 2012
I understood later that result[1] = { } puts the whole sequence into the first element of a list, while result = { } replaces the whole sequence. it's possible to preserve or replace to varying degrees with replace() and splice euphoria functions. sequences work only similarly to arrays in other languages.


