Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual
Page 65
A-B VBASIC and Visual BASIC
Appendix B
Differences Between
B–17
SOUND 1400, 2 ’1400 Hz for 2 clock ticks (20 ticks per second).
SPACE$(n)
Returns a string of spaces of length n.
X = 25
A$ = SPACE$(X) ‘A$ equals 25 spaces.
STATIC variablelist
Makes simple variables or arrays local to either a FUNCTION, or a SUB and
preserves values between calls. See VBDOS manual for detailed
information. For arrays, STATIC must precede DIM. Also any AS clauses
must match. A single variable in STATIC may NOT also appear in a DIM.
STOP
Terminates the program. Status Display #8 will indicate “End by system”.
No arguments are allowed. VBDOS manual references to compiler options
and line numbers are irrelevent. See also SYSTEM.
STR$(numeric–expression)
Returns a string representation of the value of a numeric expression. The
format of the strings returned by A-B VBASIC may not be identical to those
returned by VBDOS. For example, given STR$(1.0), VBDOS will return 1,
but A-B VBASIC will return 1.000000.
X% = 1234
S$ = STR$(X%) ‘S$ equals “ 1234”.
STRING$(m,n)
STRING$(m,stringexpression)
Returns a string whose characters all have a given ASCII code or whose
characters are all the first character of a string expression. See VBDOS
manual for specific details.
Header$ = STRING$(80,”*”) ‘Header$ equals 80 asterisks.
SUB globalname[(parameterlist)][STATIC]
...
...
END SUB
Marks the beginning and end of a subprogram. See also STATIC.