# %pclose() function

The %pclose() function closes the stream
designated by *stream* opened by a %popen() and returns the exit status of the command.

## Syntax

```
var = %pclose((char*)stream)
```
Note: This function must be used *only* to close a
stream opened by %popen().

## See also

- [%popen() function](https://d3codex.com/pickbasic-flashbasic/percent-popen-function/)
- [FlashBASIC C functions overview](https://d3codex.com/pickbasic-flashbasic/flashbasic-c-functions-overview/)
- [cfunction statement](https://d3codex.com/pickbasic-flashbasic/cfunction-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/percent-pclose-function/ - part of the D3Codex reference.
