Standard packets and standard programs

In a classroom situation it will not always be the case that a complete program is written from scratch. Rather the teacher will supply a packet of refinements, or even a complete program that the pupils have to use. For this reason, the Elan Programming Environment has a simple facility for reading standard packets and standard programs.

A <#150#>standard program<#150#> is a complete Elan program, to be used without modifications or additions. Its first refinement must have the name <#151#>program<#151#>.

A <#152#>standard packet<#152#> is a collection of declarations that the pupils may use in a program of their own without the necessity to type them in. None of its refinements may have the name <#153#> program<#153#>.

For reading these, a variant of the read-command has been introduced, the packet-command (<#154#>p<#154#>), which has the property that it keeps the contents of the packet practically invisible: the pupil can inspect but cannot modify or delete them.