RE: beginner question

new topic     » topic index » view thread      » older message » newer message

> ...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.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu