Constructor / Destructor

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Stefan Straub

Constructor / Destructor

Post by Stefan Straub » 27 Apr 2006, 11:30

 Posted by:  Stefan Straub 

Hi @all,

is there a way to set a constructor / destructor in Gupta TD 3.1 PTF 3 ?

Greetings

Stefan

--
ST

micsto
Germany
Posts: 997
Joined: 07 Mar 2017, 16:07
Location: Germany

Re: Constructor / Destructor

Post by micsto » 27 Apr 2006, 12:58

 Posted by:  Michael Stoll \( MICSTO \) 

Destructor yes ( special function "ObjectDestructor" ), constructor
unfortunately not.
A workaround for the missing constructor is a "factory function", e.g.

Function: CreateXY
...
Returns
ClassXY:
...
Local variables
ClassXY: objXY = OBJ_Null
Actions
objXY = new ClassXY
objXY.member1 =
objXY.member2 =
...
Return objXY

Michael

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 9 guests