User guide

Thereiscodegeneratedintheproceduredefinition,butitisisolatedfromtherestofthe
program.Itisexecutableonlywithinthescopeoftheprocedureandcanbereachedonly
bycallingtheprocedure.
9.3 Programs
Aprogramisanysetofstatementsthatareruntogetheratonetime.Therearetwosec-
tionswithinaprogram.
9.3.1 Main Section
ThemainsectionoftheprogramisallofthecodethatiscompiledtogetherWITHOUT
relyingontheautoloader.Thismeanscodethatisinthemainfileorisincludedinthe
compilationofthemainfilewithan#includestatement.ALLexecutablecodeshould
beinthemainsection.
Theremustalwaysbeamainsectionevenifitconsistsonlyofacalltotheoneandonly
procedurecalledintheprogram.
9.3.2 Secondary Sections
Secondarysectionsoftheprogramarefilesthatareneitherrundirectlynorincludedin
themainsectionwith#includestatements.
Thesecondarysectionsoftheprogramcanbelefttotheautoloadertolocateandcom-
pilewhentheyareneeded.Secondarysectionsmusthaveonlyproceduredefinitionsand
othernonexecutablestatements.
#includestatementsareallowedinsecondarysectionsaslongasthefilebeing
includeddoesnotviolatetheabovecriteria.
Hereisanexampleofasecondarysection:
declare matrix tol = 1.0e-15;
proc feq(a,b);
9-4
GAUSSUser Guide