Paths

A path list is a list of directory names separated by semicolons. Path names are declared using the following EBNF syntax.

Listing: EBNF path syntax
PathList = DirSpec {";" DirSpec}.
DirSpec  = ["*"] DirectoryName.

Most environment variables contain path lists directing where to look for files.

Listing: Environment variable path list with four possible paths.
GENPATH=C:\INSTALL\LIB;D:\PROJECTS\TESTS;/usr/local/lib;
/home/me/my_project

If a directory name is preceded by an asterisk ( * ), the program recursively searches that entire directory tree for a file, not just the given directory itself. The directories are searched in the order they appear in the path list.

Listing: Setting an environment variable using recursive searching
LIBPATH=*C:\INSTALL\LIB
Note: Some DOS environment variables (like GENPATH, LIBPATH, etc.) are used.