9.6 String concatenation

The string concatenation operator can be used to concatenate two strings to a new one. Because Hollywood offers automatic number to string conversion you can even concatenate two numbers. The result will always be a string though. Examples:

 
DebugPrint("Hello" .. " World")    ; prints "Hello World"
DebugPrint(5 .. " + " .. 5 .. " = " .. 10)   ; prints "5 + 5 = 10"

This operator is also useful if you want to spread a string over multiple lines. For example:

 
DebugPrint("My Program v1.0\n" ..
           "(c) by me 2005\n" ..
           "Press RETURN to start!")


Show TOC