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



Jim wrote:
>I can write code in RPG to use pointers, once I understand what I am
trying
>to do, very quickly and accurately and test it fairly easy.
>
>In C, however, I know what I want to do, I code it, then spend the next 10
>minutes trying to convince the compiler I know what I'm doing.  I have to
>convince the compiler that, yes, I know this is a character pointer, and
>yes, I know I'm pointing it to a float value, just do I want I say,
>compiler, quit trying to second guess me and compile already!

Well, I've been programming in C continuously now for
about 13 years.  Perhaps this is a matter of experience
in the language.  I find that when the C compiler
complains about pointer usage, it's usually correct.
For example, if I use the wrong pointer.  With
experience, you learn how to work with the language, and
not to fight it.  If you're using casts frequently in C,
you're fighting the language, not working with it.

>Most of the pointer bugs that crop in from my C++ code is from typed
>pointers, not what I'm trying to do.

On the other hand, C++ seems to require casting pointers.
That's probably my biggest complaint with compiled OO
languages, like C++ and Java.  You can never really get
away from knowing the class of an object.  (But maybe
experience also helps in that area too.)

>If RPG's pointers get typed, you're going to have to bring in type casting
>with it's own brand of headaches and maintainance.  I say let well enough
>alone and keep pointers are they are.  Type casting to me is a real
needless
>pain in the neck.

Personally, I can't foresee significant changes to RPG's
pointer support happening.  But if there were improvements
(and I can certainly see lots of possibilities), they
would definitely be upwards compatible.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.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.