Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 33 of 47

PDT 1100 Terminal Programmer's Guide: Chapter 10 Statement Reference, pages 301 to 309

Pages 301 to 309 of 413, from PDT 1100 Terminal Programmer's Guide

The original document is the PDF (3.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Symbol PDT-1100

Page 301

Function Reference

TIME$ Function Name: TIME

Type: I/O Function

Description Returns the current system time or wake-up time, or sets a specified system time or wake-up time.

Syntax Syntax 1 (Retrieving the current system time or the wake-up time) TIME$

Syntax 2 (Setting the current system time or the wake-up time) TIME$=”time” where: time = A string expression.

Notes Syntax 1 !

Retrieving the current system time

TIME$ returns the current system time as an 8-byte string. The string has the format below. hh:mm:ss where hh is the hour from 00 to 23 in 24-hour format, mm is the minute from 00 to 59, and ss is the second from 00 to 59. Example:

CLS PRINT TIME$

Retrieving the wake-up time TIME$ returns the wake-up time as a 5-byte string. The string has the format below. !

hh:mm

11-53

Page 302

PDT 1100 Terminal Programmer’s Guide

Syntax 2 Setting the system time TIME$ sets the system time specified by “time.” The format of “time” is the same as that in syntax 1. !

Example: !

TIME$=“13:35:45”

Setting the wake-up time

TIME$ sets the wake-up time specified by “time.” The format of “time” is the same as that in syntax 1. "

The calendar clock is backed up by the battery. (For the system date, refer to the DATE$ function.) " Set bit 2 of port 8 to 1 with the OUT statement before executing this function to return the current wake-up time or set a specified wake-up time. " For the wake-up function, refer to Appendix H, Programming Notes.

Execution Error Error code

Meaning

05h

Parameter out of range (time is out of range.)

Reference Functions

11-54

DATE$

Page 303

Function Reference

TIMEA/TIMEB/TIMEC Function Name: TIMER-A/TIMER-B/TIMER-C

Type: I/O Function

Description Returns the current value of a specified timer or sets a specified timer.

Syntax Syntax 1 (Retrieving the current value of a specified timer) TIMEA TIMEB TIMEC

Syntax 2 (Setting a specified timer) TIMEA= count TIMEB= count TIMEC= count where: count = A numeric expression which returns a value from 0 to 32,767.

Notes Syntax 1 TIMEA, TIMEB, or TIMEC returns the current value of timer-A, -B, or -C, respectively, as a 2byte integer.

Syntax 2 TIMEA, TIMEB, or TIMEC sets the count time specified by count. !

count is a numeric value in units of 100 ms.

!

When executed, the Interpreter starts a specified timer counting down in increments of 100 ms (equivalent to -1) until the timer value becomes 0.

11-55

Page 304

PDT 1100 Terminal Programmer’s Guide

Execution Error Error code

Meaning

05h

Parameter out of range ( count is a negative value)

06h

The operation result is out of the allowable range ( count is greater than 32,767.)

11-56

Page 305

Function Reference

VAL Function Name: VALue

Type: String Function

Description Converts a string into a numeric value.

Syntax VAL(stringexpression)

where: stringexpression = A string expression which represents a decimal number.

Notes VAL converts the string specified by stringexpression into a numeric value. !

If stringexpression is nonnumeric, VAL returns the value 0. PRINT VAL(“ABC”) 0

!

If stringexpression contains a nonnumeric in midstream, VAL converts the string until it reaches the first character that cannot be interpreted as a numeric. PRINT VAL(“1.2E-3ABC”) 1.200000000E-3

!

The STR$ function has the opposite capability to VAL.

Reference Functions

ASC and STR$

11-57

Page 306

Appendix A Error Codes and Error Messages Introduction This Appendix specifies all error codes and their meanings

Execution Errors Table A-1 lists the execution errors codes and their meanings. Table A-1. Execution Errors Error Code

Meaning

00h

Internal system error

01h

NEXT without FOR

02h

Syntax error

03h

RETURN without GOSUB

04h

Out of DATA (no DATA values remain to be read by the READ instruction)

05h

Parameter out of range

06h

Operation result is out of the allowable range

07h

Insufficient memory space (too many nesting levels, etc)

08h

Array not defined

09h

Subscript out of range (an array subscript is out of the array, or the array is referenced by different dimensions)

A-1

Page 307

PDT 1100 Terminal Programmer’s Guide

Table A-1. Execution Errors (Continued) Error Code

A-2

Meaning

0Ah

Duplicate definition (an array is defined twice)

0Bh

Division by zero

0Ch

CASE and END SELECT without SELECT

0Dh

END DEF or EXIT DEF instruction executed outside the DEF EN statement block

0Fh

String length out of range

10h

Expression too long or complex

14h

RESUME without error (RESUME instruction occurs before the start of an errorhandling routine)

1Fh

Function number out of range (in CALL statement)

32h

File type mismatch

33h

Received text format not correct

34h

Bad file name or number (an instruction uses the file number of an unopened file)

35h

File not found

36h

Improper file type (instruction attempts an operation that conflicts with the file type – data file, communications device file, or bar code device file)

37h

File already open (an OPEN instruction executed for the already opened file)

38h

File name is different from that in the receive header

39h

Too many files

3Ah

File number out of range

3Bh

The number of records is greater than the defined maximum value

3Ch

FIELD overflow (FIELD instruction specifies the record length exceeding 255 bytes)

3Dh

FIELD statement specifies a field width which does not match that specified in file creation

3Eh

PUT or GET instruction executed without a FIELD instruction

3Fh

Bad record number (record number is out of range)

Page 308

Error Codes and Error Messages

Table A-1. Execution Errors (Continued) Error Code

Meaning

40h

Parameter not set (ID not set)

41h

File damaged

42h

File write error (writing onto a read-only file attempted)

43h

Not allowed to access data in flash ROM

45h

Device files prohibited from opening concurrently

46h

Communications error

47h

Abnormal end of communications or termination of communications by Clear key

48h

Device timeout (n o CS signal has been responded within the specified time period)

Fatal Errors Table A-2 lists the fatal errors and their meanings. Table A-2. Fatal Errors Error Code

Message fatal error 1:

Out of memory fatal error 2:

Work file I/O error fatal error 3:

Object file I/O error fatal error 4:

Token file I/O error fatal error 5:

Relocation information file I/O error fatal error 6:

Cross reference file I/O error fatal error 7:

Symbol file I/O error fatal error 8:

Compile list file I/O error fatal error 9:

Debug information file I/O error (source-address)

fatal error 10:

Debug information file I/O error (label-address)

fatal error 11:

Debug information file I/O error (variable-intermediate code)

A-3

Page 309

PDT 1100 Terminal Programmer’s Guide

Table A-2. Fatal Errors (Continued)

A-4

Error Code

Message fatal error 12:

Out of disk space for work file fatal error 13:

Out of disk space for object file fatal error 14:

Out of disk space for token file fatal error 15:

Out of disk space for relocation information file fatal error 16:

Out of disk space for cross reference file fatal error 17:

Out of disk space for symbol file fatal error 18:

Out of disk space for compile list file fatal error 19:

Out of disk space for debug information file (source-address)

fatal error 20:

Out of disk space for debug information file (label-address)

fatal error 21:

Out of disk space for debug information file (variable-intermediate code)

fatal error 22:

Source file I/O error fatal error 23:

Cannot find XXXXSRC fatal error 24:

Error count exceeds 500 fatal error 25:

Out of memory (internal labels exceed 3000)

fatal error 26:

Control structure nesting exceeds 30 fatal error 27:

Expression type stack exceeds 50 fatal error 28:

Program too large (object area over-flow)

fatal error 29:

Out of memory for cross reference fatal error 30:

Cannot find include file fatal error 31:

Cannot nest include file