Reserved word
- A word within a program or programming language that is reserved for special use that cannot be used. Reserved words are often found in programming languages and macros.
- Reserved words are also used in operating systems as a method of identifying a device file or other service. For example, below is a listing of Microsoft reserved words in MS-DOS and Microsoft Windows operating systems. When attempting to use any of the below reserved words as a name of a file, or in a command you may encounter and unusual response. For example, attempting to save a file as CON or CON.txt may generate a reserved file name error, may say the file already exists, or may cause an access denied error. Because these are reserved words you cannot create a file using any of the below examples.
| Reserved Word | What it is |
|---|---|
| AUX | Auxiliary port aka Serial Port COM1 |
| CON | Short for console, which Microsoft describes as the display monitor. |
| COM1 | COM port. |
| COM2 | COM port. |
| COM3 | COM port. |
| COM4 | COM port. |
| LPT1 | LPT port. |
| LPT2 | LPT port. |
| LPT3 | LPT port. |
| NUL | NULL |
| PRN | Printer aka LPT1 |
Also see: Device file, Java reserved words, Operating system definitions, Programming definitions, Reserved character, Word
