xxxxxxxxxx
=== Parameters ===
'Statements' intrinsically contain only a 'command' and the optional 'other text'. A command can treat the 'other text' as a whole parameter, or as divided into multiple parameters.
Examples:
<kua>
> echo bob fred
bob fred
</kua>
: 'echo' takes the whole 'other text' as the value to print.
> set bob fred james
> bob
'bob' is 'fred'
: 'set' takes only the first two separated by space for the 'name' and 'value' parameters, and ignores james.
> echo bob "fred" 1234
bob "fred" 1234
: 'echo' still takes the whole 'other text' even with quotes.
> set bob "fred james"
'bob' is 'fred james'
: 'set' now treats james as part of the second parameter, and the quotes themselves are stripped.
==== Delimiters ====
:1. space - any whitespace
> set bob fred
:2. single quotes - any text within a set of single quotes will be a single parameter, and the quotes will be stripped.
> set bob 'fred james'
:3. double quotes - any text within a set of double quotes will be a single parameter, and the quotes will be stripped.
:3. back tick - any text within a set of back ticks will be a single parameter, and the ticks will be stripped.
> set bob `fred james`
==== Special delimiters ====
:1. Back ticks surrounding text passed directly to a context will be stripped. Normally all text is passed verbatim, including quotes. Back ticks effectively treat the rest of the statement as a block for a multi-line statement. Quotes are not removed normally as they may be important to the context's command processing. Back ticks are special in that they will be removed from the start and end of the script statement. Without this special behavior, there would be no way to run a multi-line command block for an associated context, without switching to it first.
> lua `print "bob"`
bob
> lua `
print "bob"
`
> lua '
'
Error in : [string "'print "bob"'"]:1: unexpected symbol near ''print "bob"'' (3)