Open main menu

Command/doif...

< Command
Revision as of 08:24, 1 April 2011 by Patrick Gundlach (talk | contribs) (moved \doif... to /References/en/doif...: the commands are below /Reference/en)

\doif...

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