[fpc-devel]X lib
Michael Van Canneyt
michael.vancanneyt at wisa.be
Wed Dec 13 13:24:15 CET 2000
On Thu, 14 Dec 2000, Johan Blok wrote:
> I programmed some stuff in C for X, now I want to convert it to pascal.
>
> I did a very small program, but for every macro in C I had to write a
> function, or I have to use a long
> expression that's repeated very often (for example ScreenOfDisplay). In
> xlib.pp all #defines from C are
> comments.
>
> Is there allready a unit with all this #defines rewritten as functions?
No. In principle this should be done in the xlib unit itself.
Feel free to start doing that :-)
>
> FPC supports some macro's, but only inside the unit where you defined
> them, if I understand it right.
>
> This makes very little sense, in my opinion, this type of macro's are
> almost useless.
As far as I know, no-one uses them.
>
> Why can't FPC support using macro's also outside the unit?
You better use inlined functions for such things.
Michael.
More information about the fpc-devel
mailing list