Pastey what is the difference between {x, y} and {{x, y}} in these two programs?
- 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 = {} --note this difference
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
any_key()
--TWO
include std\console.e
with trace
trace(1)
integer aWholeNumber = 1
atom aFloat = 1.999999
sequence aSequence = {3, 4}
sequence result = {0} --note this difference.
function addAll(integer first, atom second, sequence third)
return (first + second + third[1]) + third[2] & (first * second * third[1]) * third[2]
end function
result[1] = addAll(aWholeNumber, aFloat, aSequence) --note this difference
any_key()1. Comment by local2 Mar 22, 2012
this isn't runnable without editing. ill make a new pastey.


