S3 (programming language): Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m Annotated Example: WP:CHECKWIKI errors fixed + general fixes using AWB (8961)
m Syntax highlight using "algol68"
Line 32:
The program starts with a module identification, and comments which we quote by way of acknowledgment to the authors:
 
<source lang="textalgol68">
MODULE KMT_MAIN_MODULE; @ Version 1.01 @
Line 62:
Next follow a number of "mode declarations". Mode is the Algol 68 term for a type.
 
<source lang="textalgol68">
MODE KMT_BUFFER IS (96)BYTE;
MODE KMT_STRING IS REF()BYTE;
Line 88:
The program continues by declaring external procedures on which the module depends. RESPONSE indicates a return value containing error information:
 
<source lang="textalgol68">
EXT PROC (RESPONSE) KMT_UI;
Line 100:
and also some external variables:
 
<source lang="textalgol68">
EXT REF () BYTE KMT_VERSION;
Line 113:
The rest of the program consists of a number of procedure definitions. One of these, which actually defines the entry point to the program, is reproduced here:
 
<source lang="textalgol68">
GLOBAL STATIC (<STATUS 5;PSPACE 10001; TEMPLATE>) PROC KERMIT_THE_FROG IS
((<LIT "COMMAND">) REF()BYTE OPTION,