|
Leif: I tried to make three points with my message. 1. conventional wisdom is only half right - it is conventional but frequently not wise. In the absence of "wise" the conventional part doesn't matter. 2. I have frequently heard the "why would you want to do that" question. I have personally used it a few times when I didn't understand. When I asked it, I was trying to make fun of certain other people when they ask me that question. I think that you know what and who I mean here. 3. The smiley was (should have been) crooked. Of course it shouldn't break. Testing and the design of test plans is a long and painful process. I would have thought that your example would have been on someone's radar screen. Perhaps it is now. Is there some special reason for the two statement terminators on the new-count declaration? -----Original Message----- From: owner-mi400@midrange.com [mailto:owner-mi400@midrange.com]On Behalf Of Leif Svalgaard Sent: Thursday, January 25, 2001 8:10 PM To: MI400@midrange.com Subject: Re: bug in MI-compiler ----- Original Message ----- From: Richard Jackson <richardjackson@richardjackson.net> To: <MI400@midrange.com> Sent: Thursday, January 25, 2001 7:02 PM Subject: RE: bug in MI-compiler > Well everyone knows that you can't round an integer divide. Why would ever > want to do that? > > :) setting aside the "why", the translator shouldn't dump. setting aside your smiley, the following program produces the correctly rounded integer result '1': DCL DD AVG-CHANGE BIN(4) UNSGND; DCL DD NEW-COUNT BIN(4) UNSGND INIT(3);; DCL DD CHANGE PKD(21,0) INIT(P'2'); DIV(R) AVG-CHANGE, CHANGE, NEW-COUNT; ----- a packed integer is still an integer. This little piece of code gave me grief. Just venting some of that. +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +--- +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.