× 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: John Hall <jhall@xxxxxxxxxxx>
  • Date: Thu, 07 Oct 1999 12:43:28 -0400

dittos



Jim Langston wrote:
> 
> I know how to program in a lot of languages.  These include Basic (all types),
> Pascal, C, dBase and Clipper, assembly (80x86), LOGO and a little COBOL,
> FORTRAN and PERL:  There are others but I forget them all.
> 
> None of those languages treats math the way RPG does in the EVAL statement.
> 
> Yes, it is understood that the majority of decimal math is done in floating 
>point
> variables, but not all.  Take, for an example, Basic's Currency, which is a 
>fixed
> 2 decimal format.
> 
> RPG, in this case, is the odd man out.
> 
> Now to answer your points.
> 
> 1.  Computer programming is hard.
> It is?  This is news to me.  I've been programming since I was 10 years old, 
>and
> am 35 years old now.  I have picked up and dropped so many languages over the
> years I can't remember them all (remember Symphony?).  To me, programming
> is not hard, it is logical.  Or is supposed to be logical.  I do not program 
>for a
> 
> living because I make a ton of money doing it and work short hours, neither of
> which is true.  I program because I enjoy it.  If I didn't like programming, 
>I'd
> be
> doing something else.
> 
> 2.  Learning programming is hard
> I've learned programming a long time ago.  With the exception of style changes
> and unique characteristics, picking up a new language for me is rather simple.
> Notable exceptions being C (the 4th one I learned) because of it's pointer
> issues and assembly (same situation).
> 
> 3) "There's than one way to do it!"
> Interestingly enough, you have an "IF" opcode, that surprisingly does the same
> thing it does in Basic, C, pascal, etc...  And your "DO" while, until does the
> same
> thing it does in the other languages.  END IF, GOTO, MULT, etc...  If I see an
> "IF" statement in any language, I know what it's going to do.  Same with the
> others.
> And in Basic or Pascal or Clipper or C if I see something like:
> A = B * C * E / F / G
> A := B * C * E / F / G
> 
> There are only two things I am going to be looking at to figure the value of 
>A.
> First
> is the order of operations (is it * or / probably same, and is right to left, 
>or
> left to
> right) and the second is the size of my variables.  And I would be right.  
>Except
> in
> RPG where the answer could be totally different than any other language.
> 
> Why?  Because RPG wants to do it different than every other language, for no
> really
> good reason that I can see.  If the fact of the matter is there is a problem 
>and
> that
> RPG is not capable of doing it that way, I would understand.  But, there is 
>an H
> spec switch we can set to make it like the rest of the world.
> 
> What I really think happened is when the EVAL statement was originally coded
> the programmers wrote it backwards, then tried to "fix it" with the header 
>spec.
> 
> If that's the case why not just admit it, and move on?  Instead of telling 
>peoople
> 
> they're supposed to know that RPG is backwards if they had RTFM.
> 
> Regards,
> 
> Jim Langston
>
+---
| 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 ...

Replies:

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.