mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
* Delphi compatibility: VarArrayOf([]) should create empty array of variant.
+ test. git-svn-id: trunk@7735 -
This commit is contained in:
parent
93e72c2079
commit
1ae31b4037
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8303,6 +8303,7 @@ tests/webtbs/tw9054.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9076.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9076a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9085.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9098.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9107.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||
|
16
tests/webtbs/tw9098.pp
Normal file
16
tests/webtbs/tw9098.pp
Normal file
@ -0,0 +1,16 @@
|
||||
uses variants;
|
||||
|
||||
var
|
||||
v: variant;
|
||||
i: longint;
|
||||
begin
|
||||
v:=VarArrayOf([1, True, '123']);
|
||||
for i:=VarArrayLowBound(v, 1) to VarArrayHighBound(v, 1) do
|
||||
Writeln(v[i]);
|
||||
|
||||
v:=VarArrayOf([]);
|
||||
if VarType(v) <> 8204 then begin
|
||||
writeln('Wrong vartype: ', VarType(v));
|
||||
Halt(1);
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user