On 31 Mar 2005 at 23:19, Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
What I am trying to do is quite involved (part of a class library), and I need to use untyped pointers at the lower levels. I can always typecast, but would prefer not to.
Could you give us a code example here?
Here is a rough and ready example:
type listptr = pointer; pbuf = ^tbuf; tbuf = array [0..maxlist] of listptr;
type mylist = object values : pbuf; count : cardinal; constructor init (max : cardinal); procedure additem (const p; size : cardinal); virtual; [....] end;
[....]
procedure mylist.additem; begin [...] inc (count); move (p, values^[count]^, size); { gpc doesn't like this } end;
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/