Difference between revisions of "Command/doif..."
< Command
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{Reference|name=doif...|attributes=}} | {{Reference|name=doif...|attributes=}} | ||
− | |||
− | |||
Block of code depending on a Lua value - example (by WS, 3/2011): | Block of code depending on a Lua value - example (by WS, 3/2011): | ||
Line 16: | Line 14: | ||
\stoptext | \stoptext | ||
</texcode> | </texcode> | ||
+ | |||
+ | == See also == | ||
+ | |||
+ | [http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions branches and decisions] | ||
[[Category:Reference/en|doif...]] | [[Category:Reference/en|doif...]] |
Revision as of 08:58, 1 April 2011
\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