[fpc-devel]X lib

Johan Blok johanbloK at ix.nl
Thu Dec 14 11:37:08 CET 2000


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?

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.

Why can't FPC support using macro's also outside the unit?

in such a way that I can have:

unit macros;

... macro definitions ...
begin
end.

unit usemacros;

uses macros;

... here I can use all macros definitions.

begin
end.

Johan Blok





More information about the fpc-devel mailing list