The demonstration I was given used three variables, all falling to the default definitions (it's been too long to remember the specific letters used; sorry). Two of the variables are assigned very large values, and the third is set to a very small value, all positive. The three variables are added together to return a result. Because of the intermediate temporary variables selected by PL/I to store the partial results, both ends of the resulting value are truncated, leaving zero. There is no error or warning; you just get a zero result, even though the result could have been correctly represented had better intermediates been chosen.
You can get this to happen in many languages... just not as readily. Most make better choices of intermediate variables, and most warn you when something like this happens at runtime, or at least let you trap the error if you desire. ---- Robert P. Nix internet: [EMAIL PROTECTED] Mayo Clinic phone: 507-284-0844 RO-CE-8-857 page: 507-270-1182 200 First St. SW Rochester, MN 55905 ---- "Codito, Ergo Sum" "In theory, theory and practice are the same, but in practice, theory and practice are different." > -----Original Message----- > From: Linux on 390 Port [SMTP:[EMAIL PROTECTED] On Behalf Of Henry Schaffer > Sent: Wednesday, July 07, 2004 8:56 AM > To: [EMAIL PROTECTED] > Subject: Re: Progress on PL/1 for Linux > > It's been a very long time since I last used PL/I, but I don't > remember anything about its arithmetic which would give this result. > IIRC it basically used the underlying 360/370 hardware for arithmetic. > > Could you say more about this intriguing error? > > --henry schaffer > > ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
