# Difference between revisions of "Inside ConTeXt"

## Using variables

\setvariables[namespace][key=value]
\getvariable{namespace}{key}


## Defining new commands

Special characters in command names

Some commands have special characters in their names, that TeX normally does not consider to be letters: @, ! and ?. Before and after the use or definition of such protected commands in your input files, the catcode of these characters has to be changed. This is done by \unprotect and \protect:

\unprotect
\def\!test{alfa}
\protect


The newly defined command \!test can of course only be called upon when we are in the \unprotect ed state, otherwise TEX reads the command \!, followed by the word test (and probably complains loudly about not being in math mode). These protection/unprotection commands can be nested. When the nesting becomes deeper than one level, the system reports the current protection level. It is a good habit to always start your macro files with \unprotect and end them with \protect.