EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 148

Radio Shack TRS-80 Model III
274 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...
TRS-80
MODEL III
TYPE
IN FORMAT,
THEN
DATA?
+##.##,
12.12
+12.
12
TYPE
IN
FORMAT,
THEN
DATA?
"THE ANSWER
IS
+##.##",
-12.12
THE
ANSWER
IS
-12.
12
TYPE
IN
FORMAT,
THEN
DATA?
##.##+,
12.12
12.
12+
TYPE
IN
FORMAT,
THEN
DATA?
##.##+,
-12.12
TYPE
IN
FORMAT,
THEN
DATA? ##.##-,
12.12
12.
12
TYPE
IN
FORMAT,
THEN
DATA? ##.##-,
-12.12
.1.2.
12-
TYPE
IN
FORMAT,
THEN
DATA?
"
**##
IN
TOTAL.",
12.12
**12
IN
TOTAL.
TYPE
IN
FORMAT,
THEN
DATA?
*###.##,
12.12
$
12.12
TYPE
IN
FORMAT,
THEN
DATA?
$$###.##,
12.12
*12.
12
TYPE
I
N
FORMAT
,
THEN
DATA ?
**«###
. ## , 12.1
2
***$12.
12
TYPE
IN
FORMAT,
THEN
DATA? "#,###,###",
1234567
1,234,570
TYPE
IN
FORMAT,
THEN
DATA?
Another
way of using
the PRINT USING
statement is with
the string field
specifiers
"
!
"
and % spaces
%
.
Examples:
PRINT
USING
"\";
string
PRINT
USING
"%
%";
string
The
"
!
"
sign will allow
only
the first letter
ofthe string
to be printed.
The
'
'
%
spaces
%"
allows
spaces
+ 2 characters
to be printed.
Again,
the string and
specifier
can be
expressed
as string variables.
The following
program
will
demonstrate this
feature:
10
INPUT
"TYPE
IN
THE
FORMAT,
THEN
THE
STRING
DATA";
A*,
B*
20 PRINT
USING
A*;
B*
30 GOTO
10
and
RUN it:
TYPE
IN
THE
FORMAT,
THEN
THE
STRING
DATA?
',
ABCDE
A
TYPE
IN THE FORMAT,
THEN THE STRING
DATA? 7.7., ABCDE
AB
TYPE IN THE FORMAT,
THEN THE STRING
DATA? 7.
%, ABCDE
ABCD
TYPE
IN THE
FORMAT,
THEN THE STRING
DATA?
138

Other manuals for Radio Shack TRS-80 Model III

Related product manuals