File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,40 @@ local text = !("Precalculated hash: "..getHash())
6161!!(" myRandomGlobal" .. math.random (9 )) = " foo"
6262```
6363
64+ #### Output
65+ ``` lua
66+ -- Normal Lua.
67+ local n = 0
68+ doSomething ()
69+
70+ -- Preprocessor lines.
71+ initGame ()
72+ enableCheats ()
73+
74+ function doNetworkStuff ()
75+ local success = connectToServer ()
76+ if success then return " Connected!" end
77+ local success = connectToServer ()
78+ if success then return " Connected!" end
79+ local success = connectToServer ()
80+ if success then return " Connected!" end
81+
82+ return " Failed to connect after 3 tries"
83+ end
84+
85+ -- Extended preprocessor line. (Lines are consumed until brackets
86+ -- are balanced when the end of the line is reached.)
87+ function newEntity () return {__name = " Entity" ,x = 0 ,y = 0 } end
88+
89+ -- Preprocessor block.
90+
91+ -- Preprocessor inline block. (Expression that returns a value.)
92+ local text = " Precalculated hash: C62D9E6C179835E2D4D2F4613BA054B5948D00E7"
93+
94+ -- Preprocessor inline block variant. (Expression that returns a Lua string.)
95+ myRandomGlobal4 = " foo"
96+ ```
97+
6498See the [ examples folder] ( examples ) for more.
6599
66100
You can’t perform that action at this time.
0 commit comments