[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Printing strings
- From: "Peter LaDow" <pladow@...>
- Date: Wed, 2 Jul 2008 14:00:36 -0700
Thanks to everyone for their help earlier with the side effects. The
sandbox approach will work for me.
Now on to the next issue. Can somebody explain why I get different
results using print with the concatenation operators and using the
strings as separate arguments. I presume it has something to do with
calls to tostring(), but it isn't clear.
For example, assume key hold "hello" and value holds "world". Doing this:
print("'", key, "' = '", value, "'")
' hello ' = ' world '
print("'" .. key .. "' = '" .. value .. "'")
'hello' = 'world'
Where do the extra spaces come from in the former case?
"To love for the sake of being loved is human; to love for the sake of
loving is Angelic." -- Alphonse de Lamartine