Re: Open array
- From: Nicholas Sherlock <N.sherlock@xxxxxxxxx>
- Date: Wed, 23 Aug 2006 07:28:06 +1200
Fons Rave wrote:
procedure OpenArray;
procedure Xxx(Bbb : array of boolean);
begin
end;
type TArrayOfBoolean = array of boolean;
procedure Yyy(Bbb : TArrayOfBoolean);
begin
end;
var B : array of boolean;
begin
Xxx([True, False, True]); // 1
B := [True, False, True]; // 2
Yyy([True, False, True]); // 3
end;
Delphi doesn't compile lines 2 and 3. All three look comparable. But they aren't. What's the solution to line 2 and 3 ?
There isn't one, as TArrayOfBoolean isn't an open array. AFAIK, you must fill the array manually (piece by piece).
Cheers,
Nicholas Sherlock
--
http://www.sherlocksoftware.org
.
- Follow-Ups:
- Re: Open array
- From: Vincent Delporte
- Re: Open array
- References:
- Open array
- From: Fons Rave
- Open array
- Prev by Date: Delphi contract rates worldwide
- Next by Date: Re: Delphi contract rates worldwide
- Previous by thread: Open array
- Next by thread: Re: Open array
- Index(es):
Relevant Pages
|