Previous section: Special function call syntax

Dylan reference manual -- Syntax of Dylan Files

Syntax of Dylan Files

A Dylan source code file is a standard portable file format for publishing Dylan source code. Such a file has two parts, the header and the body. The header comes before the body.

The body consists of zero or more outer expressions and comments.

The header consists of one or more keyword-value pairs, as follows:

The header cannot contain comments.

Blank lines may not appear in the header. A blank line defines the end of the header and the beginning of the code body. The blank line is not part of the code body. (A "blank line" is a line consisting of zero or more space or tab characters, ending in a newline character.) The following standard keywords are defined:

module:  module-name	[Header keyword]	
Expressions in the file are associated with the named module. This keyword is required.
author: arbitrary text	[Header keyword]
copyright: arbitrary text	[Header keyword]
version: arbitrary text	[Header keyword]
These are provided for standardization. These are optional, and can be ignored by the implementation.

A typical Dylan source file might look like this:

module:	quickdraw
author: 	J. Random Rect
        	Linear Wheels, Inc., "Where quality is a slogan!"
copyright: (c) 1993 Linear Wheels, Inc., All rights reserved
version: 	1.3 alpha (not fully tested)

define constant $black-color = ...

Next section: 3. Variables