Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual

Page 51

Advertising
background image

A-B VBASIC and Visual BASIC

Appendix B

Differences Between

B–3

LINE INPUT Request$
IF Request$ = “JUMP” THEN CHAIN “JUMP”

The interpreter does not tolerate a CHAIN to a non–existent program. Make
sure that you have downloaded any program which will be CHAINed to,
before any other program attempts to CHAIN to it, or the program will crash
with a “Bad Chain File” error message. A special set of Network Directives
is required to download a program for the express purpose of a subsequent
CHAIN. See the User’s Guide for a further discussion of these Network
Directives.

CHR$(code)

Returns a one–character string whose ASCII code is the argument.

Msg$ = CHR$(34) + “Quoted string” + CHR$(34)

This example adds a double–quote character to the beginning and the end of
the string.

CINT(numeric–expression)

Converts a numeric–expression to an integer by rounding the expression’s
fractional part.

CLNG(numeric–expression)

Converts a numeric–expression to a long (4–byte) integer by rounding the
expression’s fractional part.

CLOSE [ [#]filenumber[,[#]filenumber]...]

Concludes I/O to a file or device. Closing some reserved files, such as
HOST, have additional side effects. See the description of those devices for
details.

OPEN “EMPLOYEE” FOR OUTPUT AS #1
PRINT #1, “Employee –”;EmpBadge$
CLOSE #1

CLS [{ 0 | 1 | 2 }]

Clears the front panel LCD, homes the cursor. All forms shown are
accepted, but all have the same effect.

CONST constname=expression

In a procedure a CONST overrides a GLOBAL variable of the same name.
The text of a string CONST is to be present in one place, regardless of the
number of times it is referenced. However, because string CONST

Advertising