[Lazarus] Are private data not allowed? Why?

dmitry boyarintsev skalogryz.lists at gmail.com
Sun Nov 13 03:04:27 CET 2011


You probably need to switch Delphi Sytanx mode.
Otherwise you've two different entities in the same scope with the
same name, And that causes the conflict.
But it's a good practice to name parameters different from the fields' names.

thanks,
Dmitry

On Sat, Nov 12, 2011 at 7:46 PM, Massimo Soricetti <notturno at quipo.it> wrote:
> I would like an explanation on this code (noob question, maybe):
>
> private
>  sDati: array[0..3] of string;
>  procedure Verifica(var: sDati array of string);
>
> This code returns an error because sDati is already declared. If I move the
> declaration in public space is OK:
>
> private
>  procedure Verifica(var: sDati array of string);
>
> public
>  sDati: array[0..3] of string;
>
> why this? Private data are not allowed? Why?
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list