Entering procedures and types

Once you reach the stage of Bottom-Up programming, you must learn how to input your own types, procedures and operators. You do this by first focussing on any name (for instance the name of the type or procedure you want to enter), give the edit-command and then enter its complete declaration followed by a semicolon.

Some examples. Let us first enter a procedure <#427#>new number<#427#>.


#litout560#

The Elan Programming Environment takes this for a refinement name.


#litout562#

We edit the text on the screen until we have obtained a complete procedure declaration, followed by a semicolon.


#litout564#

We can now see from the prompt that our focus is a procedure


#litout566#

As a second example, let us enter a type-declaration.


#litout568#

We massage this text on the screen into the type-declaration we want to have.


#litout570#

Do not forget the semicolon at the end.

The order of refinements, type-declarations, procedure-declarations and operator-declarations is free, but the first refinement which is entered becomes the root of the program.