Re: Beginners question: Abstract record extension

From: Juan Antonio Ortega <"Juan>
Date: Mon, 23 Sep 2002 16:06:19 +0200

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

Hello,

Well, you have declared abstract methods in the abstract class, so you have
to implement those methods in the "real" class:

> StringNode = POINTER TO StringNodeDesc;
> StringNodeDesc = RECORD (NodeDesc)
> key : ARRAY 11 OF CHAR;
> END;

PROCEDURE (x : StringNode) EqualTo* (y : Node) : BOOLEAN;
BEGIN
    WITH y: StringNode DO
         RETURN x.key = y.key
    ELSE
         RETURN FALSE
    END
END EqualTo;

Note:
you can declare the class as follows (without declaring NodeDesc):
Node* = POINTER TO ABSTRACT RECORD
    next*: Node
END;

Regards,
Juan Antonio

--------------------------------------------

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-586869192_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpc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