CTAN Comprehensive TeX Archive Network

boolexpr – A boolean expression evaluator and a switch command

The \boolexpr macro evaluates boolean expressions in a purely expandable way.

\boolexpr{ A \OR B \AND C } expands to 0 if the logical expression is TRUE. A, B, C may be: numeric expressions such as: x=y, x<>y, x>y or x<y;
– boolean switches: \iftrue 0\else 1\fi;
– conditionals: \ifcsname whatsit\endcsname 0\else 1\fi;
– another \boolexpr: \boolexpr{ D \OR E \AND F }:

\boolexpr may be used with \ifcase:

        \ifcase\boolexpr{ A \OR B \AND C }
           What to do if true
        \else
           What to do if false
        \fi
      

The \switch command (which is also expandable) has the form:

      \switch
      \case{<boolean expression>} ...
      \case{<boolean expression>} ...
      ...
      \otherwise ...
      \endswitch
    

Quellen/macros/latex/contrib/boolexpr
Dokumentation
Version3.14
LizenzenThe Project Public License
Copyright2009 Florent Chervet
BetreuerFlorent Chervet
Enthalten inTeX Live als boolexpr
MiKTeX als boolexpr
ThemenMakro-Unterstützung

Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (161.6k).

Bewertungskommentare

Laden...

Ankündigungen

Hier erscheint bei neueren Browsern ein entsprechendes Diagramm.

mehr

Gästebuch Seiten-Struktur Impressum Autor kontaktieren