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



Jon Paris wrote:
 >> Besides it doesn't fits my needs of retrieving the data type using the
address of a variable.

I'm afraid that you'll never be able to do that.  The pointer carries zero
information about the type of data it points to - nor could it.  Think about
a DS where the first field is numeric.  The DS is character, but it's
pointer will, indeed must, be identical to that of the numeric field that
begins the DS.

Do you know of any system where this can be done - I've sure never heard of
it.  Languages like C "pretend" to have pointers to specific data types, but
they're just pointers like any other and are interchangeable.


Well, ummm, any half decent dynamic OO language can do this. That is, in a dynamic OO language, you deal with object references and the objects contain all the information needed to identify the type or class of object and all the operations allowed on that object.


Theoretically, of course, you could implement a compiled language with that type of capability too. But then you'd also have to pay a performance penalty.

In other words, compiled languages like RPG are the way they are in order to favor run-time performance. If you want more advanced capabilities like self-describing data entities, you have some hard choices to make. No one programming language can be all things to all people.

Cheers! Hans



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.