HP3000-L Archives

January 1996, Week 1

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:
????? ???????? <[log in to unmask]>
Reply To:
Date:
Mon, 1 Jan 1996 23:12:29 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
In article <[log in to unmask]>, [log in to unmask]
says...
>
>I don't know if MANMAN has its own list, so for those without MANMAN, feel
>free to skip this post.
>
>It was pointed out to us by The Support Group that there is a "bug" in a
>routine called JDMPE in file XLFORS.SOURCE.MMV071 (SLFORS on some systems).
>The routine contains the statement
>
>> JDMPE = (YEAR - 73) * 1461 / 4 + DAY + 428
>
>The variables YEAR and DAY are declared as INTEGER*2 (one-word integer),
>and are extracted from the return value of the CALENDAR intrinsic.
>Unfortunately, come 1996, (YEAR - 73) * 1461  ==  23 * 1461  ==  33603
>which is greater than 32767, the limit for one-word integers. Thus, come
>1996, calls to this routine will result in an INTEGER OVERFLOW abort.
>
>There are a variety of work-arounds, all involving some type of promotion
>to four-byte integers. It is sufficient to declare the constant 73 as a
>four-byte integer, e.g.,
>
>> JDMPE = (YEAR - 73J) * 1461 / 4 + DAY + 428
>
>For consistency, you may wish to declare all constants in this fashion. To
>avoid the mixed-mode expression altogether, declare YEAR and DAY as
>INTEGER*4.
>
>--Glenn Cole
>  Software al dente, Inc.
>  [log in to unmask]
 
Does anyone have a detailed workaround for this Integer Overflow problem? I
have version 7.1
ManMan and management made us drop support for ManMan about 6 months ago, so I
can't make a
quick call to CA for a fix(bummer). All help is appreciated!
 
 
******Mark Gilliam
******Speedring Inc
******[log in to unmask]

ATOM RSS1 RSS2