Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual

Page 162

Advertising
background image

A-B VBASIC and Visual BASIC

Appendix L

Differences Between

L–15

RETURN

Returns control from a sub routine. No line number or line label clauses are
supported in A-B VBASIC.

RIGHT$(stringexpression, n)

Returns the rightmost n characters of a string.

A$ = “Now is the time for all good men to come to the aid of”
B$ = RIGHT$(A$, 6) ‘B$ = “aid of”

RND

Returns a single–precision random number between 0 and 1. No argument is
allowed in the statement. To produce random integers in a given range, use
the following formula:

INT((upperrange – lowerrange + 1) * RND + lowerrange)

RTRIM$(stringexpression)

Returns a string with trailing (right–hand) spaces removed.

A$=”When I was younger, so much younger than today “
A$=RTRIM$(A$) ‘Removes trailing spaces.

SEEK(filenumber)

Returns the current file position. See the chapter on Special Devices for
details on specific devices. See VBDOS manual for detailed information.

SEEK [#]filenumber,position

Sets the position in a file for the next read or write. See the chapter on
Devices for details on specific devices.

SELECT CASE text_expression

Executes one or more statements depending on the value of text expression.
The CASE ELSE clause is mandatory in A-B VBASIC, even if it does
nothing. See VBDOS manual for specific details.

SELECT CASE text_expression

CASE expressionlist1

statements

CASE expressionlist2

statements

CASE ELSE

Advertising
This manual is related to the following products: