CoCoA:Grammar/Program

From ApCoCoAWiki
Revision as of 15:40, 23 June 2007 by Fran (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Program

Syntax

PROGRAM ::= COMMAND | 

Static

A PROGRAM is statically correct as long as all its commands are correct in the global environment defined by the PROGRAM itself.

Run-time

A CoCoA5 PROGRAM is a (possibly empty) list of commands. A PROGRAM defines a global scope environment and loads all the packages from the cocoa/packages/ directory (no recursion on the filesystem!).

It also defines a $user package in which all the COMMANDs will be executed