---
# System prepended metadata

title: Aleo Supplementary Instructions

---



# Aleo Supplementary Instructions







## Instruction Greensheet
| Name                    | Description                               |
|:----------------------- |:----------------------------------------- |
| [call](#call)           | Call a funtion or closure                 |
| [cast](#cast)           | Casts the operands into the declared type |
| [closure](#closure)     | A function of its own environment         |
| [decrement](#decrement) | Decrement value by amount                 |
| [finalize](#finalize)   | Finalizes the operands on-chain           |
| [function](#function)   | Declare a function                        |
| [import](#import)       | Import a program                          |
| [increment](#increment) | Increment value by amount                 |
| [input](#input)         | Defines an input argument to a function   |
| [mapping](#mapping)     | Map keys with values                      |
| [output](#output)       | Defines an output of a function           |


## Instruction Documentation
#### `call`
[Back to top](#Instruction-Greensheet)
##### Description
Calls a funtion or closure with parameter(s) and stores the results in the destination register(s).

#### `cast`
[Back to top](#Instruction-Greensheet)
Cast the one or more operand(s) into declared type and stores the result in the destination register.

The declared type can be either a customized `interface` or a `record`. Casting to `literals` is currently not supported. Casting to an `external record` is illegal. The member of the interface cannot be of type `record`.

##### Description
#### `closure`
[Back to top](#Instruction-Greensheet)
Closure is structured with an identifier, inputs, instructions, and outputs.

Instructions are in order of execution. Outputs are in order desired.

##### Description
#### `decrement`
[Back to top](#Instruction-Greensheet)
Decrements the value stored at the `first` operand in `mapping` by the amount in the `second` operand.


##### Description
#### `finalize`
[Back to top](#Instruction-Greensheet)
Finalizes the operands on-chain (make it public to the network).
##### Description
#### `function`
[Back to top](#Instruction-Greensheet)
See [closure](####closure). In addition to closure, function has a optional `finalize` command and logic.

##### Description
#### `import`
[Back to top](#Instruction-Greensheet)
##### Description

An import statement defines an imported program, and is of the form `import {name}.{network};`. If no `network`-level domain is specified, the default network is used.
##### Description
#### `increment`
[Back to top](#Instruction-Greensheet)
Increments the value stored at the `first` operand in `mapping` by the amount in the `second` operand.
#### `input`
[Back to top](#Instruction-Greensheet)
##### Description
Parse the input and store it in a register with a declared register type.

#### `mapping`
[Back to top](#Instruction-Greensheet)
##### Description
Mapping has an identifier, keys and values. Key and value are intiaized with an identifier and a type.
#### `output`
[Back to top](#Instruction-Greensheet)
##### Description
Output a register or a register member.

