| Chuck Stevens 2004-08-31, 8:55 pm |
|
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:v2h7j0dqgqga79u7ufe1nlrtnrfoav4944@
4ax.com...
> They [all fixed-point numbers] are integers. If you don't think so, post
some evidence to the
> contrary.
Certainly.
Webster's Ninth New Collegiate Dictionary:
Integer: any of the natural numbers, the negatives of these numbers, or
zero
Natural number: the number 1 or any number (as 3, 12, 432) obtained by
adding 1 to this number one or more times.
Fixed-point: involving or being a mathematical notation (as in a decimal
system) in which the point separating whole numbers and fractions is fixed
Whole number: (synonymous with) integer
ANSI X3.23-1974, page I-60, 4.2, Glossary, Definitions:
Integer: A numeric literal or numeric data item that does not include any
character positions to the right of the assumed decimal point. ...
And to Bill's recommendation of Page 20 for the definition of "integer", I
would add the suggestion to note Page 75, 8.3.1.2.2.1 Fixed-point numeric
literals, which states:
A fixed-point numeric literal is a character-string whose characters are
selected from the digits '0' through '9', the plus sign, the minus sign, and
the decimal point. ... An integer literal is a fixed-point numeric literal
that contains no decimal point."
For COBOL's purposes, these citations make it clear that the set of "integer
data items" is a subset of the set of "fixed-point numeric data items".
That means that, even presuming only the context of standard COBOL, the
statements "an integer data item is a fixed-point data item" and "an integer
literal is a fixed-point numeric literal" are TRUE, the statements "a
fixed-point data item is an integer data item" and "a fixed-point literal is
an integer literal" are simply FALSE.
Others have pointed out the absurdity that 3.14159 is really an integer in
contexts beyond COBOL.
-Chuck Stevens
|