Forum > Ported from Delphi/Kylix

can fpc alias types as delphi sytem.types ?

(1/1)

alexraynepe196:
Hallow!
in my delphi code used System.Types unit.
fpc RTL have an types unit too.
and is there any way for provide delphi-way alias system.type to -> fpc-rtl types ?
or only way to solve porting - ifdefs in code?

marcov:
Best is to remove the prefixes, and then in the Delphi XE2+ project add system,winapi etc to the "default prefixes".

That way it stays working with FPC, old and new Delphi

Thaddy:
The other option is to use Lazarus' macro feature, but that makes it editor dependent.
Alas, the standard FPC macro feature does not support dots...
(I once filed a bug report for that)
If it would support dots, it would be a doddle to write such a macro.

Navigation

[0] Message Index

Go to full version