Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual
Page 61

A-B VBASIC and Visual BASIC
Appendix B
Differences Between
B–13
OCT$(numeric–expression)
Returns a string representing the octal value of the numeric argument. See
also HEX$().
ON expression GOSUB {line–number–list/line–label–list}
ON expression GOTO {line–number–list/line–label–list}
Branches to one of several specified lines, depending on the value of an
expression. See VBDOS manual for detailed information.
N = 3
ON N GOSUB GetTime, GetDate, GetLost ‘Will gosub GetLost.
OPEN file [FOR mode1][ACCESS] AS[#]filenum [LEN=reclen]
Enables I/O to a file or device. All VBDOS manual references to databases
and ISAM are unsupported in A-B VBASIC. The LOCK clause is not
supported. See the chapter on Special Devices for details on OPENing
specific devices.
TYPE EmpType
Badge AS STRING * 8
Name AS STRING * 25
END TYPE
DIM SHARED Emp AS EmpType
OPEN “EMPLOYEE” FOR RANDOM AS #1 LEN = LEN(Emp)
POS(0)
Returns the current horizontal position of the cursor on the LCD display. A
single argument is required but is ignored at run–time.
Col = POS(0)
LOCATE 1, Col
PRINT [expressionlist][{,|;}]
Outputs data to the LCD display. The format for some values may vary
between VBDOS and A-B VBASIC. A-B VBASIC divides the line into
print zones of 8 spaces each. A semicolon at the end of the print statement
keeps the cursor from advancing to the next line.
PRINT “Enter your name: “;
LINE INPUT; Name$
PRINT #filenumber,
[USING stringexpression;] expressionlist[{,|;}]
Writes data to a file in memory. A print field width is 8 characters for the
LCD, 14 for others. See the chapter on Special Devices for details on specific
devices.