[Lazarus] 'with' is evil, isn't it?
Luca Olivetti
luca at wetron.es
Fri Aug 5 13:04:35 CEST 2011
Al 05/08/11 12:53, En/na Alexander Klenin ha escrit:
> On Fri, Aug 5, 2011 at 21:51, Luca Olivetti <luca at wetron.es> wrote:
>> Al 05/08/11 12:40, En/na Sven Barth ha escrit:
>>
>>> Though "=" seems a little bit like a misuse of that operator... ":=" might be a more pascalish solution.
>>
>> I really don't mind one way or the other, but since a bare = is used for defining constants,
>> it doesn't seem out of place for defining an alias (this is not an assignment).
>>
>
> Unfortunately, "with a = b do" is already a valid operator in FPC,
> with different meaning.
What does it mean?
I tried
procedure Test;
type tr = record
f1,f2:integer;
end;
var r:tr;
begin
with a=r do;
end;
and trying to compile it
"Error: Operator is not overloaded"
"Error: Expression type must be class or record type"
Same error even if I define a:tr.
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007
More information about the Lazarus
mailing list