slicing of sequences
<SNIP>
-> Anyway, here's a piece of sample code demonstrating what I would like
-> to do, Euphoria's responce, and an explanation of the result I think
-> I should get.
-> -- Program Test.ex --
-> sequence a, b
-> a = {{1, 2, 3},
-> {4, 5, 6},
-> {7, 8, 9}}
-> b = a[1..3][3]
-> -- End Test.ex --
well heres the fix :)
-- Start Test.ex --
sequence a, b
b = {} -- added
a = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}}
--b = a[1..3][3] -- removed
for c = 1 to length(a) do -- added
b = append(b, (a[c][3])) -- added
end for -- added
print(1, b) -- added
-- End Test.ex --
-> When run, Euphoria responds with:
-> b = a[1..3][3]
-> ^Unknown Command
i dont know why that is, but someone else will :)
Hope thats a help
Mike Fowler - mike.fowler at nelsun.gen.nz
o__ ---
_,>/'_ ---
(_) \(_) ---
Tips for the month: Bill your dentist for your time in surgery.
|
Not Categorized, Please Help
|
|