No subject
Tue Jun 11 14:29:31 CEST 2019
FUNCTION FSRead(refNum: INTEGER; VAR count: LONGINT; buffPtr: UNIV Ptr):
OSErr;
>> I
>> tried replacing testDataHdl^ by Ptr(testDataHdl)^ but that gives a
>> similar error - Got "ShortInt", expected "Ptr"
The mac type Ptr is defined as usual in the UI, as a pointer to a signed
byte, hence the reference to ShortInt in the error msg, which is a signed
byte.
>> Does anyone know how I can get around this?
>=20
>> This is very likely a stupid suggestion but have you tried this
>>=20
>> Ptr(testDataHdl^)
> I had tried that and it compiles ok but when it runs, the FSRead statemen=
t
> returns an error -36 which is an I/O error
Are you shure nothing else is wrong ?
If you read a binary file, alignment might not be the same.
Actually FPC does not align arrays the same as trad mac compilers.
Olle
More information about the fpc-pascal
mailing list