Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual

Page 158

Advertising
background image

A-B VBASIC and Visual BASIC

Appendix L

Differences Between

L–11

LBOUND(array[,dimension])

Returns the lower bound (smallest available subscript) for the indicated
dimension of an array. The default lower bound is zero. Arrays dimensioned
using the TO clause in the DIM statement may have any integer value as a
lowerbound. Compliment of UBOUND.

LCASE$(stringexpression)

Returns a string expression with all letters in lowercase.

A$ = LCASE$(“NOW IS THE TIME...”) ‘Returns, “now is the time...”

LEFT$(stringexpression, n)

Returns a string consisting of the leftmost n characters of a string. See also
MID$, and RIGHT$. See VBDOS manual for detailed information.

CurrTime$ = LEFT$(TIME$,4) ‘Returns time in format HH:MM

LEN(stringexpression)

LEN(variable)

Returns the number of characters in a string or the number of bytes required
by a variable. See VBDOS manual for detailed information.

n = LEN(s$)

LINE INPUT[;][“promptstring”;]stringvariable

Inputs an entire line (up to 255 characters) to a string variable, without the
use of delimiters. The only editing character that is supported for LINE
INPUT is a backspace. The DH5 development files READ.BAS and
MENU.BAS provide greatly enhanced input capabilities.

LINE INPUT “Enter name: “;Name$

LINE INPUT #filenumber,stringvariable

Reads an entire line from a sequential file to a string variable. See the
chapter on Special Devices for details about specific devices. See example
listed for EOF().

OPEN “DATA.DAT” FOR INPUT AS #1
LINE INPUT #1, Title$

LOC(filenumber)

Returns the current position within a file. The REMARKS paragraph in the
VBDOS manual applies only to some A-B VBASIC devices. See the chapter
on Special Devices for details about specific devices.

Advertising
This manual is related to the following products: