Open array



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 ?

Thanks,
Fons.
.



Relevant Pages

  • Re: Open array
    ... procedure Xxx(Bbb: array of boolean); ... procedure Yyy(Bbb: TArrayOfBoolean); ... var B: array of boolean; ...
    (comp.lang.pascal.delphi.misc)
  • Re: Array
    ... I do know how to work with loops. ... But the problem starts when the length of the array is not known. ... > found:boolean; ...
    (alt.comp.lang.borland-delphi)
  • Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... >> A packed array of boolean allocates one storage element to each bit. ... >> provided by Ada so that the program will properly represent ... The following example starts with the creation of a generic package ...
    (comp.lang.ada)
  • Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... >> A packed array of boolean allocates one storage element to each bit. ... >> provided by Ada so that the program will properly represent ... The following example starts with the creation of a generic package ...
    (comp.lang.cpp)
  • Re: IF/THEN Structure Issues - "Error: Too Many Continuations" PLS
    ... Your boolean array suggestion sounds viable. ... Dim TxtBoxVal As Integer ... >> Else bla bla ...
    (microsoft.public.vb.general.discussion)