Keyboard
Programming Manual
71
SATO Europe
STR$()
Description
Returns a string representation of a number.
Syntax
STR$(expression)
Remarks
The result of the expression must be a numeric.
Note: STR$() function cannot be included in other functions.
Example: VAL(STR$(“123”)
Example
A$=STR$(12345)
Programming Manual
Keyboard
SATO Europe
72
SPC$()
Description
To insert a number of spaces in a string.
Syntax
SPC$(expression)
Remarks
The result of the expression must be numeric.
Example
PRINT “PRICE”;SPC$(5);“123.5”
Keyboard
Programming Manual
73
SATO Europe
System Variables
YEAR
Description
Sets and returns the year of the Real Time Clock. The YEAR variable may be set from
00 to 99. The returned data is a 4-digit number.
Ex: 1998,2001.
Syntax
YEAR=nn
Where
nn=00~99
A=YEAR
Remarks
The Real Time Clock is Year 2000 compatible.
Example
YEAR$=STR$(YEAR)
YEAR$=MID$(YEAR$,3,2)
Programming Manual Keyboard
SATO Europe
74
MONTH
Description
Sets and returns the month of the Real Time Clock. Allowable numbers are 01 to 12.
Syntax
MONTH=nn
Where
nn=01~12
A=MONTH
Remarks
N/A
Example
MONTH=12
Keyboard
Programming Manual
75
SATO Europe
DATE (day)
Description
Sets and returns the date of the Real Time Clock. Allowable numbers are from 00 to
99.
Syntax
DATE=nn
Where
nn=01~31
A=DATE
Remarks
The leap
year timing is automatic
Example
DATE=01
Programming Manual Keyboard
SATO Europe
76
HOUR
Description
Sets and returns the hour of the Real Time Clock. Allowable numbers are from 00 to
23.
Syntax
HOUR=nn
Where
nn=00~23
A=HOUR
Remarks
N/A
Example
HOUR=01
Keyboard
Programming Manual
77
SATO Europe
MINUTE
Description
Sets and returns the minute of the Real Time Clock. Allowable numbers are from 00 to
59.
Syntax
MINUTE=nn
Where
nn=00~59
A=MINUTE
Remarks
N/A
Example
MINUTE=16
Programming Manual Keyboard
SATO Europe
78
SECOND
Description
Sets and returns the second of the Real Time Clock. Allowable numbers are from 00 to
59.
Syntax
SECOND=nn
Where
nn=00~59
A=SECOND
Remarks
N/A
Example
MINUTE=16
Keyboard
Programming Manual
79
SATO Europe
IDNUMBER$
Description
IDNUMBER$ is read only at run time. The ID number can be set in the Setup Utility.
With password locked ON, users cannot change the ID number. The factory default is:
T.S.C.
Syntax
A$=IDNUMBER$
Remarks
N/A
Example
IF IDNUMBER=”T.S.C.” THEN
GOSUB USER1
ENDIF
Programming Manual Keyboard
SATO Europe
80
Appendix A - Limitations of TSKL
The total numbers of IF…THEN…ELSE, FOR…NEXT, WHILE…WEND and
DO…LOOP in a program cannot exceed 40.
The maximum numbers of GOSUB…RETURN cannot exceed 40 layers.
The number of labels can’t exceed 200.
200 long integer and float data type
variables
100 double float data type variables
50 string data type variables
The maximum number of characters for a variable name is 10.
The maximum number of characters for a label name is 20.
The available memory for download is 128 KB (SRAM).
The number of downloaded files cannot exceed 50 files.
15 files can be opened simultaneously in one program.
Maximum numbers of dimensions for array variables is 3 dimensions.
The total number of specified formats for PRINT USING and OUT USING statements
can’t exceed 15.