[fpc-pascal] Another Delphi mode question :) -- classes as parameter
Alexandre Leclerc
alexandre.leclerc at gmail.com
Wed Jul 12 17:21:31 CEST 2006
2006/7/12, Michael Van Canneyt <michael at freepascal.org>:
> Ahem.
>
> Have you tried that ? Because it is manifestly NOT true:
Ah! I learnd something today! You are completly correct:
> What IS true is that you can change the properties of S, even if it is
> passed by value or as const. But the pointer S cannot be changed.
I desired to change the pointer; manifestly I have to pass it as var.
> What is more, it gives a warning for the dotest method:
>
> [Hint] frmmain.pas(44): Value assigned to 'S' never used
There are so many hints that I'm not reading them anymore. (I found
that sometimes hints where kind of useless... For example, the
implementation of a form event OnKeyDown will generate a hint "Hint:
Parameter "Shift" not used" if I do not use this one parameter... but
I don't care about that and can't do nothing about it. This is not a
hint, this is obivious; this makes noise in the messages. So when you
have many functions/procedures/events like this, you have a plethora
of "useless" hint. So I do not check them anymore... It take too much
time to parse them all and get the relevent one.)
(By the way, can GetLongOpts have the parameter 'out' instead of 'var
Longind: Longint' this would avoid another hint about the variable not
initialized (it is useless to init the var since this is out only)...
unless 'out' does not allow 'nil').
> So FPC is perfectly compliant.
Yes, thank you for this. Best regards.
--
Alexandre Leclerc
More information about the fpc-pascal
mailing list