17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WEEKDAY<br />

Field of Application Function returning the weekday of a specified date.<br />

Syntax WEEKDAY()<br />

Chapter 2 Program Instructions<br />

is the date in DATE$ format from which the weekday will be<br />

returned.<br />

Remarks This function returns the weekday as a numeric constant:<br />

1 = Monday<br />

2 = Tuesday<br />

3 = Wednesday<br />

4 = Thursday<br />

5 = Friday<br />

6 = Saturday<br />

7 = Sunday<br />

The date should be entered according to the syntax for the DATE$ variable,<br />

i.e. in the following order:<br />

Year Last two digits (e.g. 1999 = 99)<br />

Month Two digits (01–12)<br />

Day Two digits (01–28|29|30|31)<br />

Example: June 1, 1999 is entered as 990601.<br />

The built-in calendar corrects illegal values for the years 1980 – 2048, e.g. the<br />

illegal date 991232 will be corrected to 000101.<br />

Example In this example the weekday for the current date is printed on the screen of<br />

the host (another way is to use NAME WEEKDAY$ statement and WEEK-<br />

DAY$ function):<br />

10 B$=DATE$<br />

20 A% = WEEKDAY (B$)<br />

30 IF A% = 1 THEN PRINT "MONDAY"<br />

40 IF A% = 2 THEN PRINT "TUESDAY"<br />

50 IF A% = 3 THEN PRINT "WEDNESDAY"<br />

60 IF A% = 4 THEN PRINT "THURSDAY"<br />

70 IF A% = 5 THEN PRINT "FRIDAY"<br />

80 IF A% = 6 THEN PRINT "SATURDAY"<br />

90<br />

RUN<br />

IF A% = 7 THEN PRINT "SUNDAY"<br />

yields e.g.:<br />

THURSDAY<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 241

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!