HP3000-L Archives

December 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Walter Murray <[log in to unmask]>
Reply To:
Date:
Fri, 17 Dec 1999 18:06:02 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
JIM McINTOSH ([log in to unmask]) wrote:
: Please consider the following code.  The result is that DATE-ERR-NUM is not
: equal to ZERO.  When the picture is changed to PIC 9(4) (without the
: negative sign), the result is that DATE-ERR-NUM is equal to ZERO.

Yes, that is the correct behavior.  When DATE-ERR-NUM is described
as PIC 9(4)- it is of class alphanumeric, so the comparison is
between "0000 " and "00000", which are not equal.  There is no
automatic de-editing to convert DATE-ERR-NUM to a numeric operand.


: The
: question is: has it always been thus?  Thanks in advance.

It's been this way at least since COBOL 74.  If you're asking
about HP COBOL II, I don't remember it ever handling this wrong.

[snip]

Walter Murray
Hewlett-Packard
Support Technology Lab

ATOM RSS1 RSS2