# PREINPUT Place Data in Input Queue

> Source: https://manual.pvxplus.com/directives/preinput

## Formats

|  |  |
| --- | --- |
| 1\. [Preinput Value & CTL](https://manual.pvxplus.com/directives/preinput#Mark4)*:* | **PREINPUT** *string$*\[,*ctl_val*\] |
| 2\. [Preinput CTL Only](https://manual.pvxplus.com/directives/preinput#Mark7)*:* | **PREINPUT** *ctl_val* |
| 3\. [Jump the Queue](https://manual.pvxplus.com/directives/preinput#Mark9)*:* | **PREINPUT NEXT** |

***Where***:

|  |  |
| --- | --- |
| *ctl_val* | Value to be placed in CTL when the input is processed. Numeric expression. If omitted, the channel number defaults to 0. |
| *string$* | String expression. Placed in the input queue for the user's terminal. |

## Description

Use the **PREINPUT** directive to have your program prime the input buffer for the user's terminal with a value. You can issue more than one **PREINPUT** directive with the messages queued. You can also use this directive to have subprograms respond to **INPUT** statements in the **CALL**ing or subsequent programs.

## Format 1

***Preinput Value, CTL***

**PREINPUT** *string$*\[,*ctl\_val*\]

This preinputs the *string$* expression and sets the optional CTL value to be returned. In this format, the first **PREINPUT** data will be processed first (FIFO).

## Format 2

***Preinput CTL Only***

**PREINPUT** *ctl_val*

You can add the **PREINPUT** CTL value alone to the queue.

## Format 3

***Jump the Queue***

**PREINPUT NEXT**

When you use this format, the **PREINPUT** entry goes to the front of the queue (LIFO).

## See Also

[INPUT Get Input from Terminal](https://manual.pvxplus.com/directives/input)  
[CTL Control Code: Key to End Input](https://manual.pvxplus.com/variables/ctl)
