Re: In answer to RW - again (was: Sorts (revised)
From: Robert Wagner (robert.deletethis_at_wagner.net)
Date: 07/13/04
- Next message: Robert Wagner: "Re: In answer to RW - again (was: Sorts (revised)"
- Previous message: Euromercante: "Power Cobol & ADO"
- In reply to: Chuck Stevens: "Re: In answer to RW - again (was: Sorts (revised)"
- Next in thread: William M. Klein: "IF NUMERIC - 2002 Standard (was: In answer to RW - again (was: Sorts (revised)"
- Reply: William M. Klein: "IF NUMERIC - 2002 Standard (was: In answer to RW - again (was: Sorts (revised)"
- Reply: Chuck Stevens: "Re: In answer to RW - again (was: Sorts (revised)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 13 Jul 2004 09:55:48 GMT
"Chuck Stevens" <charles.stevens@unisys.com> wrote:
>
>"Robert Wagner" <robert.deletethis@wagner.net> wrote in message
>news:40ec9718.379541379@news.optonline.net...
>
>> >> move 'A' to foo
>> >> if foo is numeric
>> >> display 'someone does not know how class tests should work'
>> >> end-if
>> >
>> >Which specific environments will do the display ? Which compilers,
>> >what versions ? (hint: mine don't).
>>
>> Best I remember, it was Honeywell .. but might have been Burroughs. The
>compiler
>> said IF NUMERIC 'should' be made against PIC 9. If you made it against PIC
>X, you
>> must accept the default substituion, which was S9(1).
>
>Such an implementation would, it seems to me, be in violation of ANSI
>X3.23-1974 page II-43, 5.2.1.2, Class condition, second paragraph.
>
>"The usage of the operand being tested must be described as display. ...
>The NUMERIC test cannot be used with an item whose data description
>describes the item as alphabetic or as a group item composed of elementary
>items whose data description indicates the presence of operational sign(s).
>If the data description of the data item begin tested does not indicate the
>presence of an operational sign [note: I'd say this includes both PICTURE 9
>and PICTURE X], the item being tested is determined to be numeric only if
>the contents are numeric and an operational sign is not present. ..."
After reading that, it is clear the compiler was in violation. I distinctly
remember writing IF X IS NUMERIC AND X NOT ALPHABETIC. I remember another
compiler that refused to do IF NUMERIC on anything but PICTURE 9.
>Note: the 2002 standard does allow NUMERIC tests against items of category
>NUMERIC; it no longer limits such tests to USAGE DISPLAY.
That must be about packed decimal. Everything is valid in binary.
- Next message: Robert Wagner: "Re: In answer to RW - again (was: Sorts (revised)"
- Previous message: Euromercante: "Power Cobol & ADO"
- In reply to: Chuck Stevens: "Re: In answer to RW - again (was: Sorts (revised)"
- Next in thread: William M. Klein: "IF NUMERIC - 2002 Standard (was: In answer to RW - again (was: Sorts (revised)"
- Reply: William M. Klein: "IF NUMERIC - 2002 Standard (was: In answer to RW - again (was: Sorts (revised)"
- Reply: Chuck Stevens: "Re: In answer to RW - again (was: Sorts (revised)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|