Re: question about repeat() function

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

Single( ' ) quotes are to delimit an characer-- which is just an atom.

Double-quotes( " ) are used to delimit a string-- which is a sequence, that is to say a sequence of characters.

Thus

s = "string"

is the same as:

s = { 's', 't', 'r', 'i', 'n', 'g' } 


It is critical to see that 'a', and "a" are not the same (first is an atom, and the second is a sequence with one element).

This should help in understanding why A.C's explaination works.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu