Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual

Page 76

Advertising
background image

Appendix C

Application Library Subroutines

C–8

ReadPassword% Inputs a password from the keyboard.

e = ReadPassword% ( length%, string$ ) ;
FUNCTION ReadPassword% ( n%, s$ )

ReadInt%

Input an integer value from the keyboard.

To suppress display of the default value, use a negative length.

e = ReadInt% ( length%, int% )
FUNCTION ReadInt% ( n%, v% )

ReadLong%

Input a long value from the keyboard.

To suppress display of the default value, use a negative length.

e = ReadLong% ( length%, long& )
FUNCTION ReadLong% ( n%, v& )

ReadReal%

Input a real value from the keyboard.

The precision specifies how many decimal points to display. It does not
affect the precision of the value input by the user. Use a negative length to
suppress the default value.

This only handles floating point values. NOT scientific forms.

e = ReadReal% ( length%, precision%, real! ) ;
FUNCTION ReadReal% ( n%, p%, v! )

Menu%

Displays a menu and waits for a selection.

A menu$ is provided which is used to format a menu on the two lines of the
workstation display. The operator can select a menu entry by using 1 of 2
methods; these are:

1. Press a LETTER or NUMBER which corresponds to the first UPPER

CASE letter or NUMBER of an entry.

2. Using the cursor keys to move to the item to be selected, then pressing

Enter.

Regardless of the selection method used, Menu% will always return an event
code of 1 through 10 for the item which was selected. If the operator pressed
Clear or Exit, a functioin key, or an event occurred which was enabled by
GLOBALMASK%, then these codes will be returned instead of 1 through
10. See Env.BAS for information on use of GLOBALMASK%.

Advertising