# clearselect statement

The clearselect statement clears the
active select-list specified by the *list.var* and
releases all overflow associated with that list. Any external select-list
is also cleared if the list variable is not specified.

## Syntax

```
 clearselect {list.var}
```

## Example(s)

**Example 1**

```

 5 *
 readnext key else
 print ’Frist Week ’,hours
 stop
 end
 read member from file,key else goto 5
 hours += member<4>
 print member<1>,member<4>
 if hours > 40 then
 clearselect
 goto 5
 end
```

 **Example 2**

 This example shows how to un-assign a variable to clear memory so that the memory can be
 used for something else:

 Type:

```

 a = 5
 print a
 clearselect a
 print a
```

 Output after compiling:

```

 5
 [B10] in program “p21”, Line 4:
 Variable has not been assigned a value; zero used.
 0
```

 The variable is now available for you to use.

## See also

- [Active list](https://d3codex.com/definitions/active-list/)
- [Default File Variables](https://d3codex.com/pickbasic-flashbasic/default-file-variables/)
- [execute statement (UNIX)](https://d3codex.com/pickbasic-flashbasic/execute-statement-unix/)
- [File variable](https://d3codex.com/pickbasic-flashbasic/file-variable/)
- [readnext statement](https://d3codex.com/pickbasic-flashbasic/readnext-statement/)
- [Secondary list](https://d3codex.com/definitions/secondary-list/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [tcl statement](https://d3codex.com/pickbasic-flashbasic/tcl-statement/)

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