Engine:CCMD run: Difference between revisions

Line 162: Line 162:
bob
bob
</kua>
</kua>
:Calls the 'lua' context 'run' command, and as normal 'print "bob"' is a complete parameter for 'run', that then gets executed in the Lua runtime all together.
: Above calls the 'lua' context 'run' command, and as normal 'print "bob"' is a complete parameter for 'run', that then gets executed in the Lua runtime all together.
<kua>
<kua>
> lua 'print "bob"'
> lua 'print "bob"'
Error in : [string "'print "bob"'"]:1: unexpected symbol near ''print "bob"'' (3)
Error in : [string "'print "bob"'"]:1: unexpected symbol near ''print "bob"'' (3)
</kua>
</kua>
: Gets presented to the 'lua' context, verbatim as 'print "bob"' as normal, and treated necessarily as a command to be run. This fails as "'print" is not a valid 'lua' context command, and 'print "bob"' is not valid Lua.
: Above gets presented to the 'lua' context, verbatim as 'print "bob"' as normal, and treated necessarily as a command to be run. This fails as "'print" is not a valid 'lua' context command, and 'print "bob"' is not valid Lua.
<kua>
<kua>
> lua `print "bob"`
> lua `print "bob"`
bob
bob
</kua>
</kua>
: With back ticks. Treats the first and last back-tick in statement as a text block. Normally quotes are not removed as they may be important to the context. Back ticks are special in that they will be removed from the start and end of the statement.
: Above with back ticks. Treats the first and last back-tick in statement as a text block. Normally quotes are not removed as they may be important to the context. Back ticks are special in that they will be removed from the start and end of the statement.


== Notes ==
== Notes ==
*
*