指针:
CBC:StartPt.x = (int)(StrToInt(mShape->Left)+i*StrToInt(mShape->Width)/Dots);
delphi:StartPt.x := trunc((mShape.Left)+i*(mShape.Width)/Dots);
另外看到人家这样:
BCB: (TYourType*)Sender
delphi: Sender As TYourType
c++是这样的:
DWORD dwSrc;
DWORD* pDest;
...
*pDest=dwSrc;
delhpi:
var
dwSrc : DWord;
pDest : PDword;//或者pDest : ^Dword;//
...
pDest:=@dwSrc;
数组:BCB中int ID[10],ID有10个元素,从0到9,delphi中ID:array[0..9]of integer,ID有10个元素,从0到9,跟BCB是反着的,BCB用元素个数
表示,delphi用下标表示
BCB:
//波形参数
typedef struct
{
unsigned int mDots; //波形点数
double mDacclk; //时钟
double mWaveData[2*262144]; //波形数据
double mNoise[2*262144];
double mGenWave[2*262144];
}WavePara;
delphi:
//波形参数
type
WavePara=record
mDots:LongWord; //波形点数
mDacclk:Double; //时钟
mWaveData:array [0..2*262144-1]of double; //波形数据
mNoise:array[0..2*262144-1]of double;
mGenWave:array[0..2*262144-1]of double;
end;