Example of a standard packet

The program <#461#>karel<#461#> (see 3.7) is a standard packet but not a standard program. The difference is that the root of a standard program must be named <#462#>program<#462#> whereas for a standard packet it must be different from <#463#>program<#463#>. This gives us the opportunity to add our own refinement <#464#>program<#464#> as root of the program, in which all the refinements of the packets can be used. The packet as it were extends the language with a number of concrete algorithms.

In order to use this standard packet we first read it with a packet-command. Then we read the standard packet <#465#>environ<#465#> in the same way. Finally we read the program <#466#>newspaper<#466#> by means of a read-command and give the execute-command. Only the refinements of this last program can be modified or deleted. The refinements of the packets can not be modified or deleted and will not be saved by a write-command.