<!-- PDF page 305 -->

```
9000 DEF FN c(n)=n*n*n
```

which sets up the user defined function **FN c(n)** which returns the *cube* of *n* (the number you type into the parentheses). Now exit from *NextBASIC* and return to the calculator – you can now use this user defined function as if it were one of the ZX Spectrum Next's own built-in functions. For example, enter:

```
FN c(3)
```

and the calculator will print the number **27** (i.e. the *cube of 3*).

### Exiting from the calculator

When you have finished using the calculator, press the **EDIT** key. The screen will change to:

![Fig. 55 – Calculator Options Menu](/documentation/manual/rev3/figures/p305-fig55-calculator-options.png)

```
 Options
< 14MHz
 Calculator
 32/64/85
 Exit
           1792K

Calculator
```

*Fig. 55 – Calculator Options Menu*

Select the *Exit* option to return to the opening menu. If you were working on a *NextBASIC* program before you started using the calculator, then you may return to the program by selecting the *NextBASIC* option. (If you wish to continue using the calculator, then select the *Calculator* option).

