[EMAIL PROTECTED] wrote:
> Quoting David Mears <[EMAIL PROTECTED]>:
>
>> The only two things Pascal really misses for me are think ability to
>> natively link with C++, and keyword level associative arrays.  The later
>
> What do you mean by "keyword level associative arrays" ?
>
> _________________________________________________________________
>     To unsubscribe: mail [EMAIL PROTECTED] with
>                "unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
something that would defy the logic of the pascal dialect, I'm afraid,

but something like
Program testAssArrays;
var
  Pilots[ansistring] AssociativeArray of record
     name:string;
     height:integer;
     weight:integer;
  end;
begin
  Pilots['4457sj'].name := 'bob'; 
   write(sizeof(Pilots)); // displays 1
  Pilots['4457sj'].height = 72;
   write(sizeof(Pilots)); // displays 1
  Pilots['4488km'].name:='Frank';
  write(sizeof(Pilots)); //displays 2
  write(Pilots['4457sj'].name); //displays bob
end.
No uses (except the implicit system use)
as part of the basic syntax.  not that this can't be done with objects. 
Not that this isn't already done in various places and ways using
objects.  It's just a very basic task that I'd like to be able to do
procedurally, at the level of the core language... the problem being,
that in keeping with the spirit of pascal, you would either need to
define the number of elements in the var statement, with setlength(), or
both.. and if you were to do that, you need to be able to return both
the number of elements and the maximum potential number of elements.  It
would have one fast b-tree type, non-overridable search.  Very useful
for certain sets of problems.  And simpler to deal with for people who
tend to approach problems procedurally (like me) before building objects
around the logic... err, and finding objects for the logic. 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to