File: switch.cwl

package info (click to toggle)
texstudio 4.9.1%2Bds-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 110,128 kB
  • sloc: cpp: 111,264; xml: 18,668; ansic: 8,977; python: 357; javascript: 177; sh: 147; makefile: 52
file content (16 lines) | stat: -rw-r--r-- 912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# switch package
# Matthew Bertucci 2025/05/13 for v1.0

\newswitch{switch%cmd}{default code}#d
\addcase{switch}{case}{case code}

\switch_new:Nn %<⟨switch⟩%> {%<⟨default code⟩%>}#/%expl3
\switch_addcase:Nnn %<⟨switch⟩%> {%<⟨case⟩%>} {%<⟨case code⟩%>}#/%expl3
\switch_if_exist:NT %<⟨switch⟩%> {%<⟨true code⟩%>}#/%expl3
\switch_if_exist:NF %<⟨switch⟩%> {%<⟨false code⟩%>}#/%expl3
\switch_if_exist:NTF %<⟨switch⟩%> {%<⟨true code⟩%>} {%<⟨false code⟩%>}#/%expl3
\switch_if_case_exist:NnT %<⟨switch⟩%> {%<⟨case⟩%>} {%<⟨true code⟩%>}#/%expl3
\switch_if_case_exist:NnF %<⟨switch⟩%> {%<⟨case⟩%>} {%<⟨false code⟩%>}#/%expl3
\switch_if_case_exist:NnTF %<⟨switch⟩%> {%<⟨case⟩%>} {%<⟨true code⟩%>} {%<⟨false code⟩%>}#/%expl3
\switch_undefine:N %<⟨switch⟩%>#/%expl3
\switch_case_undefine:Nn %<⟨switch⟩%> {%<⟨case⟩%>}#/%expl3