EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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
Page #307 background imageLoading...
Page #307 background image
Chapter
10
I
BASIC
Keywords
SGN
Function
S
GN(
num
her)
Determines
number's
sign.
If
number
is a negative number, SGN returns
-1.
If
number
is a positive number, SGN returns
1.
If
number
is
zero, SGN returns
0.
Examples
Y
=
SGN<A
*
E)
determines the sign
of
the expression
A
*
B,
and passes the ap-
propriate number
(-1,0,1)
to
Y.
Sample Program
610 INPUT "ENTER
A
NUMBER";
X
620 ON SGNCX)
+
2
GOT0 630, 640, 650
630 PRINT "NEGATIVE": END
650 PRINT "POSITIVE": END
640 PRINT
"ZERO-:
END
305

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals