Subject Common Typecast
Author Jack Cane, Ph.D.
Need to write a single procedure which I can call with two (perhaps more, later) different ibo types.


Currently I have two:
proc1( query: TIBOquery; etc…);
proc2( cursor: TIB_cursor; etc…);


Can I combine these into a single procedure that uses a common ancestor?
proc( iboObj : tAncestor; etc. );


Thinking I can then typecast the query/cursor in the calling method:


var crs : TIB_cursor
crs: := TIB_cursor.create(self);
.
.
.
proc2( tAncestor( crs ), etc. );


Can that work? What would be the correct ancestor type?


Best,
jwc






[Non-text portions of this message have been removed]