inputctrl statement

The inputctrl statement is used to enable or suppress control characters in BASIC input statements.

Syntax

inputctrl on|off

Synonym(s)

input ctrl

Description

suppressed Ignores control characters entered by the user on succeeding BASIC input statements, with the exception of standard editing control characters.

Characters unaffected by the input control statement:

  • CTRL+H: Erase one character
  • CTRL+J: Linefeed
  • CTRL+M: Carriage return
  • CTRL+R: Redisplay current input field
  • CTRL+W: Erase one word
  • CTRL+X: Clear entire input
  • CTRL+/: Sub-value mark
  • CTRL+]: Value mark
  • CTRL+^: Attribute mark
enabled Acknowledges all control characters entered by the user on succeeding BASIC input statements.

The default value for this setting is loaded from the TCL default and is always enabled. The TCL default can be changed with the TCL control-chars command.

When you are in mvBase compatibility mode, the input control command works opposite of the way it does in D3. Review the following tables:

D3 inputctrl statement

on enabled
off suppressed

mvBase compatibility input ctrl statement

on suppressed
off enabled

Example(s)

In the following example, the user is asked to enter a street address. To ensure that no control character appears in the address, use the input control statement that suppresses the control characters.

 
 $OPTIONS MVBASE
 PRINT "ENTER YOUR STREET ADDRESS"
 INPUT CTRL ON
 INPUT ADDRESS