Time – Remote Processing CAMBASIC User Manual

Page 166

Advertising
background image

Comm ands - 133

TIME$

Function

SYNTAX:

a$ = TIME $(n)

PURPOSE:

The TIM E$ function is used to read the system calendar/clock. T he system clock keeps time on a 24
hour basis with a resolution of one second.

REMARK S:

The tim e is retur ned in two fo rms, depending u pon the value of the arg ument n. W hen n= 0, the
hours, m inutes and seconds are returned. W hen n= 1, the minutes and seconds are retur ned.

The cloc k is set by the T IME $ statemen t.

RELATED:

TIME$ statement and DATE$

EXAMPLE:

10 TIME$ = "11:23:45"
20 PRINT TIME$(0)
30 PRINT TIME$(1)

11:23:45
23:45

ERROR:

< Data negative> – for n
< Illegal argument> – if n > 1

Advertising