Re: SDL-News: casting to parent type ?

Subject: Re: SDL-News: casting to parent type ?
From: Rick Reed TSE (
Date: Mon Dec 11 2000 - 14:02:23 GMT

Become an SDL Forum Society member <>
The originator of this message is responsible for its content.
-----From Rick Reed TSE <> to sdlnews -----

Thomas Garsiot at wrote on 08/12/2000 08:46:

> Is there any way of casting a variable to its parent type ?

SDL does not directly support type casting.

However, SDL supports EXTERNAL procedures and EXTERNAL operators.

The SDT tool supports EXTEERNAL procedures but not EXTERNAL operators.

Therefore any type casting needed can be written as an EXTERNAL procedure,
provided you understand the way that the data is encoded for the two types

Such a procedure is defined in a text box:

PROCEDURE castType1Type2 FPAR t1 Type1; RETURNS Type2; EXTERNAL;

(See section 8 of Addendum 1 to Z.100).

Rick Reed -
Tel:+44 1455 55 96 55 Fax:+44 1455 55 96 58 Mob.:+44 7970 50 96 50

--End text from Rick Reed TSE <> to sdlnews --- For extra SDL Forum Society benefits join at <>

This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:49 GMT