Declarations

The declarations are located in the index under the Declarations entry under the net name.

Declarations in the index

Declarations in the index

Clicking on the triangle next to the Declarations entry opens the declarations. Clicking on a triangle next to an individual declaration or clicking on the declaration text opens this declaration.

Open declarations

Open declarations

Add a declaration

To add a declaration, bring up the Declarations marking menu on the top declarations node or on one of the separate declarations in the index. Select the New Decl entry.

Declarations marking menu

Marking menu on top declarations node

Marking menu on a specific declaration

Marking menu on individual declaration

The added declaration will appear either at the bottom of the list of declarations or below the declaration where you added it. The declaration will be in text edit mode when it appears, so it can be modified right away.

New declaration

New declaration

You can insert new lines by pressing Enter, and you can create a new declaration below the one you are editing by pressing Ctrl-Enter. You can also add a declaration to an existing declaration if you separate them with a ;. When you finish text editing, the declarations will be split into separate declarations.

Multiple declarations in one

Multiple declarations in one

Declarations separated after text edit

Declarations separated after text edit

To finish text editing, click somewhere on the background or press the ESC key.

Add a declaration block

Declaration blocks are used to divide declarations into groups, often in larger nets with many declarations. Below, the variables are put together under a block called VARIABLES:

A declaration block

A declaration block

To add a declaration block, bring up the Declarations marking menu and select the New Block entry. The new block will appear at the bottom of the list or after the declaration where you added it, and it will be in text edit mode when it appears.

New declaration block

New declaration block

To add a declaration to a block, bring up the Declarations marking menu on the block and select the New Decl entry.

Moving a declaration or declaration block

It is possible to rearrange the declarations by dragging and dropping within the Declarations entry in the index. You can drag declarations into and out of declarations block to improve your overview of your declarations.

Drag the declaration to after what it depends on

Drag the declaration to after what it depends on

The only limitation is the syntax check, which requires declarations to come after those it depends on. But this can be achieved by dragging declarations.

Adding declarations through keyboard shortcut

If you are editing a declaration or block (see below), you can add a new declaration by pressing Ctrl-Enter. If you are editing in the index, the new declaration will appear below the one you are editing. If you are editing in a text sheet, the new declaration will be opened in the same binder as the one you are working in.

Edit a declaration

To edit a declaration or block, open it in the index by clicking on the triangle next to it, and then click on the declaration or block text. The reddish color indicates that all text is selected. See more about how to edit text.

Declaration in text edit mode

Declaration in text edit mode

To finish editing, click somewhere on the background or press the ESC key to exit text edit mode.

Alternatively, drag the declaration (block) from the index to a text sheet.

Dragging a declaration to a text sheet

Dragging a declaration to a text sheet

Click on the text and edit it. To finish editing, click somewhere outside of the text or press the ESC key. The text will now be syntax checked, and any error that might occur will be shown with highlighting. See Syntax checking for more information.

Editing the next declaration through keyboard shortcut

If you are editing a declaration or block (see below), you can jump to the next declaration or block by pressing Tab. If you are editing in the index, you will jump to the next declaration or block in the index. If you are editing in a text sheet, you will jump to the next declaration in the same binder.

Related pages

Add/edit inscriptions, Edit text, Syntax checking, Errors in declarations, Standard ML

Long click
Add/edit inscriptions

You must be logged in to post a comment.