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

From Wiki
Jump to navigation Jump to search
m (Text replace - "Reference/en|" to "Commands|")
m (moved Reference/en/doif... to Command/doif...: Text replace - "Reference/en/" to "Command/")

Revision as of 03:06, 14 March 2012

\doif...

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

See also

branches and decisions