# TeX/endinput

< TeX

\endinput

## Description

• This command terminates the input process in the middle of a file. It is redundant at the end of a file.
• On encountering this command, TeX continues reading until the end of the line. This makes it possible to wrap \endinput in an \if oneliner.

## Example

\def\false{false}
\def\students{false}

% Questions, for teachers and students ...

\ifx\students\true\endinput\fi