1. problem with sequences
- Posted by mexzony Dec 07, 2010
- 1078 views
guys i seem to have problem with sequences especially when they are used in loops and how to use them for example
function shell_sort(sequence x) -- Shell sort based on insertion sort integer gap, j, first, last object tempi, tempj last = length(x) gap = floor(last / 10) + 1 while TRUE do first = gap + 1 for i = first to last do tempi = x[i] j = i - gap while TRUE do tempj = x[j] if compare(tempi, tempj) >= 0 then j += gap exit end if x[j+gap] = tempj if j <= gap then exit end if j -= gap end while x[j] = tempi end for if gap = 1 then return x else gap = floor(gap / 3.5) + 1 end if end while end function
i mean that i still have not fully understood the whole concept of sequences especially when i try to read programms that use them especially in loops and other forms.for you to be very good in euphoria you have to know sequences alot.any advice or form of help.am studying hard but i get fraustrated at times
2. Re: problem with sequences
- Posted by euphoric (admin) Dec 07, 2010
- 1044 views
See the docs for sequence variable type.
Ask specific questions about source that you might still not understand.
3. Re: problem with sequences
- Posted by mattlewis (admin) Dec 07, 2010
- 1079 views
i mean that i still have not fully understood the whole concept of sequences especially when i try to read programms that use them especially in loops and other forms.for you to be very good in euphoria you have to know sequences alot.any advice or form of help.am studying hard but i get fraustrated at times
A sequence is basically an array, or a list. Each element can be an atom or a sequence. If you have a more specific question, please ask.
Matt