[BLACKBOX] Polymorphism

From: [at]} <Aubrey.McIntosh{>
Date: Thu, 20 Nov 2008 21:23:13 -0600

----boundary-LibPST-iamunique-941916825_-_-
Content-type: text/plain

In writing my List module, I have a method DoEach that walks the list,
and applies method Do to each element.

                        (this: List) Do (VAR params: ANYREC), NEW, EMPTY;
                        (root: List) DoEach (VAR params: ANYREC), NEW;

In moving some existing software to the new library module, it turns
out that I wish to apply a few different procedures to the list. In
trying to avoid procedure variables, I find I am drawing a blank.
Making several lateral extensions to the base record may be an
approach, particularly if there is a pointer to a record with that
particular implementation as one of the fields in params. I will
alternate between envisioning some structure to do this and Goggling
for the next while. A brief search of "Component Pascal Polymorphism"
seems more or less on target and enough reading to fill a night.

I thought I saw some message about this under the general heading of
polymorphism on this list some years ago. If anyone remembers this,
or can point to a file either in the distribution or online I'd focus
my thoughts there fairly early on.


-- 
-- 
Aubrey McIntosh, Ph.D.
1502 Devon Circle
Austin TX 78723-1814
http://home.grandecom.net/~amcintosh/aubrey/Search/
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-941916825_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEluIHdyaXRpbmcgbXkgTGlzdCBtb2R1bGUsIEkg
aGF2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QYXNj
YWwgUG9seW1vcnBoaXNtIlxwYXINCnNlZW1zIG1vcmUgb3IgbGVzcyBvbiB0YXJnZXQgYW5kIGVu
b3VnaCByZWFkaW5nIHRvIGZpbGwgYSBuaWdodC5ccGFyDQpccGFyDQpJIHRob3VnaHQgSSBzYXcg
c29tZSBtZXNzYWdlIGFib3V0IHRoaXMgdW5kZXIgdGhlIGdlbmVyYWwgaGVhZGluZyBvZlxwYXIN
CnBvbHltb3JwaGlzbSBvbiB0aGlzIGxpc3Qgc29tZSB5ZWFycyBhZ28uICBJZiBhbnlvbmUgcmVt
ZW1iZXJzIHRoaXMsXHBhcg0Kb3IgY2FuIHBvaW50IHRvIGEgZmlsZSBlaXRoZXIgaW4gdGhlIGRp
c3RyaWJ1dGlvbiBvciBvbmxpbmUgSSdkIGZvY3VzXHBhcg0KbXkgdGhvdWdodHMgdGhlcmUgZmFp
cmx5IGVhcmx5IG9uLlxwYXINClxwYXINClxwYXINCi0tIFxwYXINCi0tIFxwYXINCkF1YnJleSBN
Y0ludG9zaCwgUGguRC5ccGFyDQoxNTAyIERldm9uIENpcmNsZVxwYXINCkF1c3RpbiBUWCA3ODcy
My0xODE0XHBhcg0KaHR0cDovL2hvbWUuZ3JhbmRlY29tLm5ldC9+YW1jaW50b3NoL2F1YnJleS9T
ZWFyY2gvXHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEg
bWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9C
RVJPTi5DSH19AJ60bEo=
----boundary-LibPST-iamunique-941916825_-_---
Received on Fri Nov 21 2008 - 04:23:13 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:51 UTC