Re: Dynamic Sequences

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

>> I understand how you can add strings to the beginning or end of
>> sequences, but how can you delete a value from a sequence?
>> i.e. foo = {12, 13, 14, 15} after command foo = {12, 14, 15}. I know
>> I could probably write a routine to copy the whole sequence except
>> for the unwanted value, but is there an easier way to do this?
>
>Yes, there IS an easy way to do this:
>Suppose you have a sequence called S, and want to delete element N:
>
>S = S[1..N - 1] & S[N + 1..length(S)]
>
>You could also make a function called remove() or something to do
>this.
>
>Hope this helps.
>
>Michael Bolin
>

Hey, thanks!  I have been wondering about this also, and couldnt figure out
how to do it.  Obviously I need to print the docs (I hate exiting an editor,
reading a doc, and reentering an editor).  I know i can read them while
using ed, but I'm used to QEdit.

Anyway, I have sent my order for the Complete Edition, and am anxiously
awaing its arrival.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu