|
>polymorphism is supported very well and i am glad to "create" it a little
by
>myself. - This term "p." sounds very scientific but what is it?
>Very simple:
>I send the same "message" (or " request" - *not* an AS/400-message object)
to an
>object. This message can be the simple "display": the same "message" to an
object
>but various objects will react in a different way.
>
>i can DSPOBJD ("display" the object "objectDescription") or just DSPCST
(display
>customer). The same "message" but the DSPCST will run a pgm which opens a
DPSF an
>perhaps a lotta other PF/LF... but that is not important to *me*.
I agree this is an example of polymorphism, a very primitive form of
polymorphism. In a true "polymorphic environment" I would expect a DSPOBJD
to display different kinds of info for different object types. In fact in
a "true polymorphic environment", we should just have a DSPOBJ which will
lead you to different screens for different object types and be capable of
DSPFD ( for PFs/LFs), DSPDBR (for PFs), DSPPGMREF (for PGMS) and so on.
>Using inheritance is also possible although it needs that a designer
really
>understands what this means.
>
>*MODULEs, subProcedures, local/global variables, static/dynamic binding.
etc are
>helping very much.
>What i am still missing a little is the possibility to get the "type" of a
>variable or to create
>variable "types" officially (would help to reduce potential sources of
error).
I agree with you entirely here. We (RPG programmers) need the ability to
create new data types. RPG (III and IV) do not (at this point) have the
technology that emulates "Classes" that enable true Inheritance.
Balaji
bvenkata@commsoft.net
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 mailing list archive is Copyright 1997-2025 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.