Changes

Jump to navigation Jump to search
1,076 bytes added ,  09:25, 22 May 2012
Add list of doif... commands. Move Lua example to == Example ==
{{Reference|name=doif...|attributes=}}
Block of code depending on a Lua value - example (by WS* <tt>\doifnextcharelse</tt>* <tt>\doifundefined</tt>, 3<tt>\doifdefined</tt>, etc.* <tt>\doif</tt>, <tt>\doifnot</tt>, <tt>\doifelse</tt>* <tt>\doifempty</tt>, <tt>\doifnotempty</tt>, <tt>\doifemptyelse</tt>* <tt>\doifinset</tt>, <tt>\doifnotinset</tt>, <tt>\doifnotinsetelse</tt>* <tt>\doifcommon</tt>, <tt>\doifnotcommon</tt>, <tt>\doifcommonelse</tt>* <tt>\doifsamestringselse</tt>,<tt>\doifsamestring</tt>,<tt>\doifnotsamestring</tt>* <tt>\doifinstringelse</tt>,<tt>\doifincsnameelse</tt>* <tt>\doifnumberelse</tt>* <tt>\doifassignmentelse</2011):tt>
<!--* {{cmd|doifnextcharelse}}* {{cmd|doifundefined}}, {{cmd|doifdefined}}, etc.* {{cmd|doif}}, {{cmd|doifnot}}, {{cmd|doifelse}}* {{cmd|doifempty}}, {{cmd|doifnotempty}}, {{cmd|doifemptyelse}}* {{cmd|doifinset}}, {{cmd|doifnotinset}}, {{cmd|doifnotinsetelse}}* {{cmd|doifcommon}}, {{cmd|doifnotcommon}}, {{cmd|doifcommonelse}}* {{cmd|doifsamestringselse}},{{cmd|doifsamestring}},{{cmd|doifnotsamestring}}* {{cmd|doifinstringelse}},{{cmd|doifincsnameelse}}* {{cmd|doifnumberelse}}* {{cmd|doifassignmentelse}}--> == Example ==We can also write tests using Lua. (Example by WS, 3/2011.) <context mode="mkiv" source="yes" text="Gives:">
\starttext
\ctxlua{test = true}

Navigation menu