----boundary-LibPST-iamunique-1249949528_-_-
Content-type: text/plain
Hector,
please have a look at Services.SameType.
IF aux1 IS THE SAME TYPE THAN aux2 THEN ...
translates into
IF Services.SameType(aux1, aux2) THEN ...
Cheers,
Marc
Oberon microsystems, Inc.
-----Original Message-----
From: 460853{([at]})nowhere.xy
Sent: Montag, 16. September 2002 20:16
To: blackbox{([at]})nowhere.xy
Cc: BorrajaX{([at]})nowhere.xy
Subject: how to know from wich type is an instanced object?
Hello again.
Firts of all I'd like to apologize for the lot of messages I have written in
a
few days (and all of them asking; none answering), but one of them was for a
friend :).
Well, the question is that I'm not an advanced programmer, so, lots of
questions assail me, and, for the time, every question that I asked here was
clearly and quickly clarified. I know at least three people like me that you
have helped a lot with your responses.
The question of today...well... the question of today at 20:00 is:
How can I get the type of an instanced object?. I mean, how could I do
something like:
IF aux1 IS THE SAME TYPE THAN aux2 THEN...
I know that I am able to do something like:
IF aux1 IS SomeType THEN,
or
WITH aux1:SomeType DO,
but to do that you have to put in the "right side " of the comparision a
type,
not an object.
I don't know if it would help, but the comparision I want to do is between
classes that have the same root (or base clase), for example:
TYPE
BaseClass=POINTER TO EXTENSIBLE RECORD; END;
Tp1= POINTER TO RECORD (BaseClass); END;
Tp2= POINTER TO RECORD (BaseClass); END;
..
PROCEDURE (l: List) Insert (b: BaseClass), NEW;
BEGIN
IF b IS OF TYPE Tp1
---do something--
ELSIF b IF OF TYPE Tp2
---do something different---
ELSE
END;
END Insert;
(*Don't mind about the list that acts like receiver of the method. It is
only
for the example *)
Thank you in advance
HECTOR;
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word
"unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send
a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list
owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to
the mailing list. That way, the list server will recognize you as subscriber
and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are
subscribed, your message will be moderated to avoid spam. Please understand
that moderation will often cause some delay, in particular over weekends or
holydays.
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-1249949528_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhlY3RvcixccGFyDQpccGFyDQpwbGVhc2UgaGF2
ZSBhIGxvb2sgYXQgU2VydmljZXMuU2FtZVR5cGUuXHBhcg0KXHBhcg0KSUYgYXV4MSBJUyBUSEUg
U0FNRSBUWVBFIFRIQU4gYXV4MiBUSEVOIC4uLlxwYXINClxwYXINCnRyYW5zbGF0ZXMgaW50b1xw
YXINClxwYXINCklGIFNlcnZpY2VzLlNhbWVUeXBlKGF1eD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