# procwrite statement

The procwrite statement writes a string
expression variable to the calling Proc’s primary input buffer.

## Syntax

```
procwrite var
```

## Parameter(s)

| var | Specifies the string expression variable to write to the calling Proc’s primary input buffer. |
| --- | --- |

## Description

In order for a Proc to interact
with the information in the variable, each space in the variable defines
a new parameter in the Proc’s input buffer.

## Example(s)

This Proc checks the primary
input buffer to see if it has been altered by the program `this.program`.

```
pq
hrun bp this.program
p
if a1 = abort x
```
This program writes to the controlling Proc’s primary
input buffer.

```
buffer = start.date:" ":end.date
procwrite buffer
```

## See also

- [error() function](https://d3codex.com/pickbasic-flashbasic/error-function/)
- [procread statement](https://d3codex.com/pickbasic-flashbasic/procread-statement/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [tclread statement](https://d3codex.com/pickbasic-flashbasic/tclread-statement/)
- [then/else statement blocks](https://d3codex.com/pickbasic-flashbasic/then-else-statement-blocks/)

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