[fpc-pascal] small bug with pass-by-reference on array elem

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Jun 29 09:41:50 CEST 2008


On 28 Jun 2008, at 23:55, David Emerson wrote:

> {$mode objfpc}
>
> procedure assign_it (out x : longint);
>   begin
>      x := 7;
>   end;
>
> var
>   a : array [0..1] of longint;
>   b : longint;
>
> begin
>   assign_it (b);   // no warning
>   assign_it (a[1]);   // errant warning issued
> end.

This bug has already been fixed and the fix will be in the next release.


Jonas

PS: please do not sent new messages to the list by replying to older  
ones, because it puts your new message in the same thread as the older  
messages in mail clients which are configured to group threads  
(because mail clients add a header referring to the message ID of the  
message you are replying to for exactly this purpose).




More information about the fpc-pascal mailing list