ALGOL 68RS: Difference between revisions
Content added Content deleted
m (LinkALGOL 68R) |
m (copy edit - wiki link to wikipedia) |
||
Line 1: | Line 1: | ||
{{wikipedia}}{{implementation|ALGOL 68}} |
{{wikipedia}}{{implementation|ALGOL 68}} |
||
ALGOL 68RS from [ |
ALGOL 68RS from [[wp:Royal_Signals_and_Radar_Establishment|RSRE]] was a portable compiler system written in ALGOL 68RS (bootstrapped from [[ALGOL 68R]]), and implemented on a variety of systems including the [[wp:wiki_ICL_2900_Series|ICL 2900]]/[[wp:ICL_Series_39|Series 39]], [[Multics]] and [[wp:VAX|DEC VAX/VMS]]. |
||
The language was based on the Revised Report, but with similar subset restrictions to [[ALGOL 68R]]. |
The language was based on the Revised Report, but with similar subset restrictions to [[ALGOL 68R]]. |
||
Line 9: | Line 9: | ||
Syntax: |
Syntax: |
||
⚫ | |||
<pre> |
|||
⚫ | |||
[ CONTEXT holename IN progtitle ] |
[ CONTEXT holename IN progtitle ] |
||
[ USE uselist ] |
[ USE uselist ] |
||
enclosed clause |
enclosed clause |
||
FINISH |
FINISH</lang> |
||
⚫ | |||
</pre> |
|||
<pre> |
|||
⚫ | |||
CONTEXT holename IN progtitle |
CONTEXT holename IN progtitle |
||
[ USE uselist ] |
[ USE uselist ] |
||
decsbody |
decsbody |
||
KEEP keeplist |
KEEP keeplist |
||
FINISH |
FINISH</lang> |
||
</pre> |
|||
=== Example === |
=== Example === |
||
⚫ | |||
<pre> |
|||
⚫ | |||
BEGIN |
BEGIN |
||
MODE PIECE = STRUCT(...); |
MODE PIECE = STRUCT(...); |
||
Line 36: | Line 30: | ||
HERE displaying(PIECE, pieces, BOARD, game); |
HERE displaying(PIECE, pieces, BOARD, game); |
||
... |
... |
||
END |
END</lang> |
||
</pre> |
|||
⚫ | |||
<pre> |
|||
⚫ | |||
CONTEXT thinking IN chess |
CONTEXT thinking IN chess |
||
... |
... |
||
FINISH |
FINISH</lang> |
||
</pre> |
|||
An entire program can thus be '''composed''' of pieces of other modules, particularly if a ''hole'' contains a sub-''hole'' (eg displaypiece), then this ''hole'' can in-turn be pulled into the composition. |
An entire program can thus be '''composed''' of pieces of other modules, particularly if a ''hole'' contains a sub-''hole'' (eg displaypiece), then this ''hole'' can in-turn be pulled into the composition. |
||
Example: |
Example: |
||
⚫ | |||
<pre> |
|||
⚫ | |||
COMPOSE game(thinking=thinkmodule, displaying=displayingmodule(piece=displaypiece)) |
COMPOSE game(thinking=thinkmodule, displaying=displayingmodule(piece=displaypiece)) |
||
FINISH |
FINISH</lang> |
||
</pre> |