How to use arrays
Posted on 1998-07-26
Proper usage of arrays:
Can someone confirm whether this is the proper way to use arrays in Delphi?
I am concerned about a few things:
1) Must I 'Free' my array type before the Application terminates?
2) When I '.Clear' my array (see below), what are the new values of the array? In the case of a Boolean array, do all the items in the array turn to "False" or to "nil"? If this was an Integer array, would would all the cleared values become? Zero? How about strings?
Are there any other things I need to be concerned about when using Arrays in this manner?
TMarkedForDeletion = array[0..512] of Boolean;
MessageMarkedForDeletion : TMarkedForDeletion;
procedure MarkThisDelete(Record : Integer);
MessageMarkedForDeletion[Record] := True;