× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: [Re: RPGILE V4.3 Gotcha]
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Tue, 5 Oct 1999 09:37:50 -0700

I think in other languages it helps to know the fine points of the
arithmetic operations too.  When I took C in school, one of the most
valuable parts of the beginning of the course was how numbers are
represented and how you can expect them to behave.  You can get some
peculiar results with integers and floats.  What about the dirty zero
problem with floats or overflow with signed integers?  The problem with eval
is that the default precision rule will, in some cases, give you results
that are not intuitive to most people (and don't meet the expected
precision.)  It's not like every computation with decimal numbers will come
out wrong or even a sizeable minority.  I'd like the default to be
*resdecpos, but I haven't really seen arguments for both sides of the
question.  

> -----Original Message-----
> From: Jim Langston [mailto:jlangston@conexfreight.com]
> Sent: Tuesday, October 05, 1999 8:37 AM
> To: RPG400-L@midrange.com
> Subject: Re: [Re: RPGILE V4.3 Gotcha]
> 
> 
> Read my response to Hans,
> 
> I have read a LOT of the manuals, but far from all of them.  
> I have read
> the CLs cover to cover, DDS, and a lot more (gave a partial list to my
> response to hans).
> 
> The point is, I should NOT have to read the manual on how the system
> multiplies A * B * C.  I should just have to read the manual 
> to figure out
> how to get it to do it.
> 
> If I told my son to multiply 12.50 then times 1.50 then times 
> 0.825 and
> he told me the answer was 1, he would be wrong, because the answer is
> 1.54.  If any compiler I had ever used had given me an answer 
> of 1 it would
> of been wrong, and none have.  But, why am I to expect RPG to 
> suddently
> decide the answer is 1, when the rest of the world knows it's not?
> 
> Perhaps you don't understand my point.
> 
> When I wanted to multiply two numbers together, I saw that it 
> was MULT.
> I read that it required two numbers to multiply and a result 
> field.  And it
> worked
> as advertised.  I did not have to go read the manual to 
> determine if RPG was
> smart enough to know that 1.5 x 1.5 = 2.25, I figured it was 
> smart enough to
> figure that out, and it was.  As in every other language I program in.
> 
> Now I see they have this nifty new command called Eval, that 
> lets me string
> together formulas.  I see the format.  Should I know expect 
> that RPG had a
> brain tumor and forgot that 1.5 x 1.5 = 2.25 and not 2?
> 
> Regards,
> 
> Jim Langston
> 
> Colin Williams wrote:
> 
> > I have to say that I agree with Hans.
> >
> > What do you mean you shouldn't have to read the manual. 
> They are there
> > to be used, there's nothing embarrassing about refering to 
> the manual,
> > and I can't understand why some people think there is.
> > If I hadn't picked up the CL manual all those years ago, 
> I'd probably
> > still be an operator today.
> >
> > How do you learn new tachniques, without reading up on 
> areas that you
> > are not currently using.?
> 
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to 
> RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: 
> david@midrange.com
> +---
> 
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.