× 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.



 >>  Here is a typical OS/400 data base data type not supported by RPG as a
standard.

_If_ RPG was a new language and had no legacy to deal with I would agree
with you.  But this is not the case.  RPG for eons had only the type B
binary type (which was implemented with the same rules as COBOL) - when
binary data is encountered on the database that is what it is translated to
by default.  Pure Ints (I and U) were introduced (relatively) recently - had
the compiler suddenly changed its default behavior there would have been
screams of agony from RPGers around the world at this unexpected behavior
change.  One of the most frustrating things about compiler writing is that
you often don't get to _fix_ things because it would screw people up - you
just get to provide alternatives.  That is what happened in this case.  They
gave you an alternative.

 >> This really hurts RPG, just like being required to know the maximum
digit length of integers.

I don't think it "hurts".  How big is an Int in C ?  You don't know the
answer unless you know the platform.  What does COMP mean in COBOL?  Same
answer.  Having the spec be in digits is a pain but doesn't exactly take a
lot of memory space - again it was a compatibility thing.  Type B was
defined this way - how many people would have complained if type I used
bytes instead of digits?  You can argue that the decision for type B was
wrong and that the original design was flawed - I probably wouldn't argue
with that - but once that decision was made - well we're back to the
compiler writers dilemma again.  You can't "fix" it - you can only provide
alternatives.

Jon Paris
Partner400




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.