Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual

Page 52

Advertising
background image

A-B VBASIC and Visual BASIC

Appendix B

Differences Between

B–4

statements produce executable code, they should be placed at the start of a
program.

CONST FALSE = 0, TRUE = NOT FALSE

CSNG(numeric–expression)

Converts a numeric expression to a single precision value.

CSRLIN

Returns the current line(row) of the cursor on the front panel display.
See also POS(0).

Row = CSRLIN
LOCATE Row, 5

CVI, CVS, CVL, (CVD)

(CVD is no longer supported) See VBDOS manual for specific
information. TYPE...END TYPE is much more versatile for use with
random files.

DATE$

Returns a string containing the current date or sets the date. The format of the
date string is yymmddw, where yy is the year, mm is the month, dd is the
day, and w is the day of the week
(1 = SUNDAY). This is different than the VBDOS format!

DateString$ = DATE$

DATE$ = ”yymmddw”

Sets the current date. See format above. Note that A-B VBASIC will
automatically compute and update the day of the week (w) if it is omitted or
specified incorrectly. This method of setting the actual date is in addition to
the Setup Menus and the Network Directives which allow the host to set the
date. Note also that this format is different than the VBDOS date! See also
TIME$.

DATE$ = “931115”

‘Set the date to “11/15/1993”

DECLARE {FUNCTION | SUB} name(parameters)

Declares references to BASIC procedures and invokes argument type
checking. Sometimes the VBDOS editor insists on adding a clause reading
AS ANY. This syntax is tolerated but is unable to perform full parameter
verification. SEE “prototyping”.

Advertising