EasyManua.ls Logo

Sharp MZ-700 - Page 43

Sharp MZ-700
213 pages
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...
(2)
Format
specification for string values
(a) !
When the values being displayed are character strings, specifying
an
excla-
mation mark in
"format
string" causes
just
the first character
of
the string
specified to be displayed.
(Example:)
10
A$=
"CDE "
20
PRINT USING "!" ;
A$
RUNJ
c
(b) & '-' '-' '
-"
--'
&
Specifying
11
& '-' '-' '-' '-' &
11
in the format string causes the first 2 + n charac-
ters
of
specified string expressions to be displayed (where n
is
the number
of
spaces between the two ampersands).
If
fewer than 2 + n characters
are specified in a string expression, characters displayed are left-justified
in the field defined
by
11
& '-' '-' '-' '-' & " .
(Examples:)
10
A$=
11
ABCDEFGH
11
20 PRINT USING
11
& '-' '-' '-' '-' &
11
;
A$
RUNJ
ABCDEF
10
A$=
11
XY
11
20 PRINT USING
11
& '-' '-' '-' '-' &
11
;
A$
RUN J
XY
(3) String constant
output
function
When any character other than those described above
is
included in the format
string
of
a PRINT USING statement,
that
character
is
displayed together with
the value specified following the semicolon.
(Example:)
lOA=
123
20PRINTUSING
"
DATA####
"
;A
RUN J
DATA'-'123
(4) Separation
of
USING
Usually, PRINT and USING are specified adjacent
to
each
other
; however,
it
is
possible to use them separately withiil. the same statement.
(Example:)
lOA=-12
:B=
14
:C=
12
20 PRINT A; B;USING
11
####
11
;C
'-------,-----
~----
~-----
Normal PRINT function USING function
RUN J
-1
2'-'
14 '-''-' 12
---------------
--
----------------
------------------
----
----
---------41
'

Other manuals for Sharp MZ-700

Related product manuals