Ross Levis wrote:
> Hi Rob
>
> The compiler is complaining about the const Zeros declaration
> Zeros: array[0..1023] of Byte = [0];
>
> Incompatible types: 'Array' and 'Set'.
That's cause you're using set notation. Filling a typed constant
array like that would look more like:
const
Zeros: array[0..1023] of Byte = (0, 0, 0, {...}, 0);
You'll need to replace the "{...}" with sufficient zeros to fill
the array.
> Should it perhaps need to be a global variable which I fill using
> FillChar?
That should also work; though IIRC a globally declared variable
is automatically zeroed by the compiler (in theory anyway).
BTW, if you're going to be dealing with a lot of similar sized
buffers declared like that, you'd be well served to declare a
type representing that, e.g.:
type
TBufferArray: array[0..1023] of Byte;
const
Zeros: TBufferArray = (0, 0, 0, {...}, 0);
var
MyGlobalArray: TBufferArray;
Now you can perform direct assigments as these are all type
compatible.
Stephen Posey
[EMAIL PROTECTED]
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi