GPDL Program Structure
A GPDL program will consist of function definitions. There is no such thing as'global' data. Any permanent data must reside in the UAF game-state variables.
The input syntax is free-form. Except for the comment indicator ( "//" ) that skips to the end of the current line. Other than that, whitespace is all that is required between 'words' and you are free to make your program as pretty or as ugly as you please. Ugly is easier.
Function definitions look like this:
$FUNC name (parameter list) { body of function } name ;
All functions return a value, whether you know it or not. If no value is specified by a '$RETURN' statement then an empty string is returned by default.
You can provide a prototype for a function. And you must if you want to use the function before it is defined. A prototype is like a definition with the body removed:
$FUNC name (parameter list) ;
A function definition consists of statements. Statements end with a semi-colon. The general classes of statements are:
Function definitions Assignment statements Function calls Comments
Control Structures.....See: