Re: question about repeat() function
- Posted by _tom (admin) Apr 16, 2010
- 1308 views
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.