[lazarus] objpas and linux
Cliff Baeseman
Cliff.Baeseman at Greenheck.Com
Fri May 14 09:54:05 EDT 1999
That is ok I will try that as for the objpas thing I tried that last night
and TObject could not be found.
I had classes in the uses clause and fpcobj specified?
Cliff
-----Original Message-----
From: michael at wisa.be [mailto:michael at wisa.be]On Behalf Of Michael Van
Canneyt
Sent: Friday, May 14, 1999 4:23 AM
To: lazarus at miraclec.com
Subject: Re: [lazarus] objpas and linux
On Thu, 13 May 1999, Peter Vreman wrote:
>
> Please don't use the objpas unit directly in the uses clause. Please put a
>
> {$mode objfpc}
>
> in top of the file.
>
> New compiler snapshots (starting tomorrow) will issue a warning.
>
>
> Also use the common pascal way to read a file instead of fdopen/fdread, so
> it can also be compiled for win32. If the linux unit is really need place
> it atleast between a {$ifdef linux}
Better yet:
FOR ALL LOW-LEVEL FILE/DISK/DATE STUFF, use the sysutils unit.
It is 100% Delphi compatible, and exists on all platforms.
The reason FCL compiles on all platforms is because it uses the sysutils
unit
only !
In concreto:
fdOPen -> FileOpen/FileCreate
fdRead -> FileRead
fdWrite -> FileWrite
fdSeek -> FileSeek
fdTruncate -> FileTruncate
It also has many file-name handling functions:
ExtractFileName
ExtractFileExt
ExtractFilePath
ExtractFileDir
ExtractRelativePath (NOt in Delphi)
Which autmatically take care of / or \ issues and the like.
Using the sysutils unit for low-level stuff makes porting more easier.
Michael.
_________________________________________________________________
To unsubscribe: mail lazarus-request at miraclec.com with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus
More information about the Lazarus
mailing list