# Directives

PREINPUT | Place Data in Input Queue

## Formats

1. Preinput Value & CTL: | PREINPUT string$[,ctl_val]
2. Preinput CTL Only: | PREINPUT ctl_val
3. Jump the Queue: | 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 CALLing 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
CTL Control Code: Key to End Input