# clear statement

The clear statement sets all local and
common variables to 0 in a main program.

## Syntax

```
clear
```

## Description

In a subroutine, only the local
variables are affected. Named common variables are not affected by
the clear statement.

## See also

- [assigned() function](https://d3codex.com/pickbasic-flashbasic/assigned-function/)
- [Assignment](https://d3codex.com/pickbasic-flashbasic/assignment/)
- [common statement](https://d3codex.com/pickbasic-flashbasic/common-statement/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [subroutine statement](https://d3codex.com/pickbasic-flashbasic/subroutine-statement/)
- [Variables](https://d3codex.com/pickbasic-flashbasic/variables/)

---
Source: https://d3codex.com/pickbasic-flashbasic/clear-statement/ - part of the D3Codex reference.
