Re: [BLACKBOX] Sorting Extended Records

From: [at]} <Wojtek>
Date: Mon, 28 Mar 2011 14:25:40 -0400

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

Use type guard and type test:

> VAR base: BaseType; extended: ExtendedType;
> BEGIN
> base := extended; (* Always works. *)
> extended := base(ExtendedType); (* Works only if 'base' is
> actually a pointer to an 'ExtendedType' instance, traps
> otherwise. *)

IF base IS ExtendedType THEN
   extended := base(ExtendedType);
ELSE
   Log.String("base is not ExtendedType"); Log.Ln
END;


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-720217822_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFVzZSB0eXBlIGd1YXJkIGFuZCB0eXBlIHRlc3Q6
XHBhcg0KXHBhcg0KPiAgVkFSIGJhc2U6IEJhc2VUeXBlOyBleHRlbmRlZDogRXh0ZW5kZWRUeXBl
O1xwYXINCj4gIEJFR0lOXHBhcg0KPiAgICAgIGJhc2UgOj0gZXh0ZW5kZWQ7ICgqIEFsd2F5cyB3
b3Jrcy4gKilccGFyDQo+ICAgICAgZXh0ZW5kZWQgOj0gYmFzZShFeHRlbmRlZFR5cGUpOyAoKiBX
b3JrcyBvbmx5IGlmICdiYXNlJyBpc1xwYXINCj4gICAgICBhY3R1YWxseSBhIHBvaW50ZXIgdG8g
YW4gJ0V4dGVuZGVkVHlwZScgaW5zdGFuY2UsIHRyYXBzXHBhcg0KPiAgICAgIG90aGVyd2lzZS4g
ICopXHBhcg0KXHBhcg0KSUYgYmFzZSBJUyBFeHRlbmRlZFR5cGUgVEhFTlxwYXINCiAgIGV4dGVu
ZGVkIDo9IGJhc2UoRXh0ZW5kZWRUeXBlKTtccGFyDQpFTFNFXHBhcg0KICAgTG9nLlN0cmluZygi
YmFzZSBpcyBub3QgRXh0ZW5kZWRUeXBlIik7IExvZy5MblxwYXINCkVORDtccGFyDQpccGFyDQpc
cGFyDQotLS0tXHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAi
U0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIfX0AfgBYAw==
----boundary-LibPST-iamunique-720217822_-_---
Received on Mon Mar 28 2011 - 20:25:40 UTC

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