RE: beginner question
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 23, 2002
- 347 views
> ...what happens if you don't know what the length > of the sequence is at the start of the program and > you want to keep adding to it? Initialize your sequence: sequence mySeq mySeq = {} To "add to it," as you'd like to do, use append(): mySeq = append(mySeq, anotherSeq) You can also use the following: mySeq &= anotherSeq I think. I'm not so sure about that last one. In this way, your sequence grows dynamically. If you want to initialize a sequence with a set number of items right up front, use repeat(): mySeq = repeat("", 1000) And, finally: yes, it's true: you can also add items within a sequence.