Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-09

Sets and delphi compatibility

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi.

I found, that this code does not work like in Delphii (-Sd).

var
  v: variant;
begin
  v := 'hi';
  writeln(VarType(v));
  writeln(varEmpty);
  writeln(varNull);
  if VarType(v) in [varEmpty, varNull] then
    writeln('NULL')
  else
    writeln(v);
end.

FPC output:
256
0
1
NULL

DCC output:
256
0
1
hi

I think that compiler makes set [varEmpty, varNull] only 8-bit. Is't any switch here to increase Delphi compatibility?

Petr

Ing. Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email