[fpc-devel]append below mail, compiler directive...

KO Myung-Hun komh at chollian.net
Fri Sep 22 15:17:35 CEST 2000


Hi.

I forgot about compiler directive problem.

If setting to {$MODE DELPHI}, locate {$H-} directive above 'program' or
'interface' sentence, {$H-} ignored.

Below is a simple test program.

--------
{$MODE DELPHI}
{$H-}
program ShortStringProblem;
var
    S : string;

begin
    WriteLn( SizeOf( S ));
end.
-------

If this program run correctly, size of short string, 256, should be
printed. But result that we can get is '4', size of pointer, so
ansistring.

But If {$H-} is located below 'program' or 'interface' or {$MODE DELPHI}
is removed, {$H-} operated correctly.

For better FPC !!!

    from KO Myung-Hun...








More information about the fpc-devel mailing list