[fpc-pascal] porting to 64bit

fred f ffred69 at gmail.com
Fri Jun 24 16:56:09 CEST 2011


Hi,

What's wrong on this condition to get the code running on 32 and 64bit:

// Get pointer to varlength data.
function GetVarLengthData(AVarLength:PAnsiChar):PAnsiChar;
begin
     Result:=PAnsiChar(AVarLength){$IFDEF FPC}+SizeOf(PtrInt){$ELSE}+4{$ENDIF};
end;

Thanks in advance.

F.



More information about the fpc-pascal mailing list