Thread View: borland.public.delphi.migration
1 messages
1 total messages
Started by Alexandre Bento Freire
Mon, 26 Feb 2007 16:53
from D5 to D2006: packed object problem
Author: Alexandre Bento Freire
Date: Mon, 26 Feb 2007 16:53
Date: Mon, 26 Feb 2007 16:53
45 lines
2106 bytes
2106 bytes
Hi.
I have many large applications written in Delphi 5 (almost 1 milion lines of
code),
some are very heavy in math calculus others in visual parts, some both.
I have lots of 'packed object' because I need to make sure it had a certain
size plus I need
it to extend, but I couldn't classes due the time it takes to allocate
memory.
[1] How to port packed object
Ex:
type
PObjectRec = ^TObjectRec;
TObjectRec = packed object(TStringRec)
Obj : Pointer;
end;
into D2006 ?
[2] Operator overload is the main reason for me to port into the new
version,
but from some basic tests, I found out that I can't use it in object type.
type
T2DPointA = packed array[0..1] of TMetric;
T2DPoint_ = packed object
public
X, Y : TMetric;
end;
type
P2DPointA = ^T2DPointA;
P2DPoint = ^T2DPoint;
T2DPoint = packed object(T2DPoint_)
public
function Add(const Value : T2DPoint) : P2DPoint;
function Sub(const Value : T2DPoint) : P2DPoint;
end;
I want to port the Add and Sub into operator overload, to make more easy to
write BIG geometric equations.
Is it possible ?
Thanks in advance
Alexandre
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads