EasyManua.ls Logo

Sharp MZ-700 - Page 62

Sharp MZ-700
213 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The
CLR
command also cancels all function definitions made with the DEF
FN
statement; therefore, it
is
also necessary to reexecute
DEF
FN
statements
to
rede-
fine such functions before they can be used again.
Note
CLR
statements cannot
be
included in a
FOR~NEXT
loop
or
BASIC subroutine.
2.3.8.
5
Tl$
Format
Function
Example
TI$
"
hh
mm
ss
"
TI$ is the name
of
the system string variable which contains .the time
of
the com-
puter's
built-in clock.
This built-in variable
is
automatically incremented once each second, and the six
character string contained in this variable indicates
the
hour, minute, and second,
with two characters used
for
each.
For
example,
if
the
string contained in TI$ is
"092035 ", the time is 9 :20:35 A
M.
Variable TI$ is automatically set to
00:00:00
when BASIC
is
loaded
into
the
com-
puter.
To
set
the current time
of
day, use the string assignment statement.
For
example, the clock can
be
set to
7:00:00
P.
M.
by
executing the following.
TI$
= "19
0000
"
The
clock
is
set
to
7:00:00
and
then
restarted automatically when the CR
key
is pressed.
The digits specified for the
hour
must
be in the range from
00
to 23, and those
specified for the
minute
and second
must
each be in the range from
00
to
59.
The following program displays the current local time in various cities
of
the world.
1 0
PRJNT
" [;] "
2 0 D I M C $ C 1
0)
. D C 1
0)
. E C 1
0)
. T $ C 1
0)
3 0 F
OR
I
=1
T O 1
0:
READ
C$
C I ) . D C
I)
:NE
X T
4 0
PRINT
"
ENTER
NEW
YORK
TIME
C
HOUR.
MINUT
E.
SECOND)
"
5 0
INPUT
B$:TI$=B$:PRINT
" [;] "
60
PR
I
NT
"
Ill
" :
T$
C
1)
=T
I $
70
FOR
1
=1
TO
1 0
8 0 E
Cl ) =
VA
L C
LEFT$
C
T$
(1),
2
))
+D
Cl )
9 0
1
00
1 1 0
12
0
13
0
IF
E Cl ) =
24
THE
N E Cl ) = 0
IF
E CI )
<0
THEN
E C1
)=24+
E CI )
T$
Cl )
=STR$
CE Cl
))
+RIGHT$
C
T$
C
1),
4 )
' '
IF
LEN
CT $ C
l)
)
=5
THEN
T$
Cl ) =
"0"
+T$
Cl )
PRINT
C$
Cl )
;TAB
C
15);
LEFT$
C
T$
Cl ) , 2 ) ;
1 4 0
PRINT
" : " ;
MID$
CT $ C
I)
,
3.
2)
; " : " ;
RIGHT$
C
T$
( 1) , 2 ) ;
15
0
NE
X T
:GOTO
60
16
0
DATA
NEW
YO
RK.
a
MOSCOW.
8.
RIO
DE
~ANE
IRO.
2
1
70
DATA
SYDNEY.
1
5.
HONOLULU.
-5.
LONDON.
5.
CA
IR
O. 7
1
80
DATA
TOK
YO
. 1
4.
SAN
FRANCISC
O.
-3,
PAR
IS
.6
60------------------
--~------------------
--
------------------------------
0

Other manuals for Sharp MZ-700

Related product manuals