# list

Tells the compiler to create a listing of the source file.

## Syntax

Linux: | -list[=filename] -no-list

macOS: | -list[=filename] -no-list

Windows: | /list[:filename] /list-

## Arguments

filename | Is the name of the file for output. It can include a path.

## Default

-no-list or /list- | No listing is created for the source file.

## Description

This option tells the compiler to create a listing of the source file. The listing contains the following:

- The contents of files included with INCLUDE statements

- A symbol list with a line number cross-reference for each routine

- A list of compiler options used for the current compilation

The contents of the listing can be controlled by specifying option show.

The line length of the listing can be specified by using option list-line-len.

The page length of the listing can be specified by using option list-page-len.

If you do not specify filename, the output is written to a file in the same directory as the source. The file name is the name of the source file with an extension of .lst.

## IDE Equivalent

Visual Studio: Output Files > Source Listing (/list)

Output Files > Source Listing File (/list:[filename])

## Alternate Options

None

Parent topic: Output, Debug, and Precompiled Header Options

## See Also

show compiler option
list-line-len compiler option
list-page-len compiler option