Forum archive 2000-2006

Michael Gage - ENDDOCUMENT

Michael Gage - ENDDOCUMENT

by Arnold Pizer -
Number of replies: 0
inactiveTopicENDDOCUMENT topic started 12/15/2001; 12:20:10 PM
last post 12/15/2001; 12:20:10 PM
userMichael Gage - ENDDOCUMENT  blueArrow
12/15/2001; 12:20:10 PM (reads: 1708, responses: 0)

ENDDOCUMENT

Description
ENDDOCUMENT() must be the last executable statement in the PG source file

Syntax

ENDDOCUMENT();

Params

None

Action

This returns the parsed and compiled PG source to the calling program. Statements after this one are not read or executed.
The variables ($STRINGforOUTPUT, $STRINGforHEADER_TEXT,%PG_ANSWERS_HASH,%PG_FLAGS); are returned to the calling program and the PG parser exits.

Returns

Nothing (to the PG problem source)

Examples

A barebones PG problem has this structure:

DOCUMENT();
loadMacros(PGbasicmacros.pl,
PGanswermacros.pl );

BEGIN_TEXT
Hello \{ans_rule()\}

END_TEXT
ANS(str_cmp("World") );
ENDDOCUMENT();

See Also

PGtranslator.pm

Macro Definition File

PG.pl

 

<| Post or View Comments |>