Re: append() tip

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

I'm afraid that's not entirely correct.  First of all, you are assuming
that q is an atom, which is rarely the case when using append and
concatenation.  I must say that &= is an enigma to the language.  While
useful for concatenating two or three strings together, its use in
building a sequence of data is inefficient.  It is better to use repeat
and a for loop for that purpose.  Append or prepend are used in database
tables when adding records to a sequence.  I will not bore you with the
details, as they are readily available in the archives and
documentation, and will no doubt be discussed at great length again
shortly.

Michael J. Sabal

>>> a.tammer at hetnet.nl 05/30/02 09:38AM >>>

Hi all,

For the experienced users among you that didn't discover it yet:

a=append(q, a) can easily be replaced by

a&={q}

prepend(a,q) by

a={q}&{a}

or variations of it.

I hated to have to look up the function from the beginning,
and came up with this.

EUrs

antoine tammer

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

Search



Quick Links

User menu

Not signed in.

Misc Menu