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
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to