[fpc-devel] Sets and delphi compatibility

petr.kristan at epos.cz petr.kristan at epos.cz
Mon Sep 19 14:52:58 CEST 2005


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



More information about the fpc-devel mailing list