Conversion array[] of char -> PChar
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
with this declaration:
;var
; name_a : packed array[0..255] of char;
; name_b : PChar;
the FPC compiler (0.99.14a) will refuse to
compile the line
; if (name_b <> name_a) then
while it works under Turbo Pascal (TP).
; if (name_b <> PChar(name_a)) then
is a legal FPC line, but illegal in TP.
I used
; if (name_b <> PChar(@name_a)) then
because it seems to work for both compiler.
Additional information:
Reporter: Jacques Nomssi Nzali
EMail: nomssi at physik dot tu-chemnitz dot de
Mantis conversion info:
- Mantis ID: 2923
- OS: WIN32
- Version: ?
- Fixed in version: 0.99.15