Difference between revisions of "Command/doif..."

From Wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
\stoptext
 
\stoptext
 
</texcode>
 
</texcode>
 +
 +
[[Category:Reference/en|doif]]

Revision as of 12:27, 31 March 2011

See branches and decisions

Block of code depending on a Lua value - example (by WS, 3/2011):

\starttext
  \ctxlua{test = true}
 
  Test is \ctxlua{commands.testcase(test)}{True}{False}.
 
  \ctxlua{test = false}

  Test is \ctxlua{commands.testcase(test)}{True}{False}.
\stoptext