On 17 Mar 2013, at 15:02, Luca Olivetti wrote:

> Al 17/03/13 13:54, En/na Marco van de Voort ha escrit:
>> In our previous episode, Sven Barth said:
>>>> 
>>>> Texas Instruments' Pascal had an extension of the with statement, IIRC
>>>> it used = instead of AS
>>>> 
>>>> With a=VeryLongNameForARecord, b=AnotherRecordWithAVeryLongName do ...
>>> 
>>> Now THAT is really unpascalish... either ":=" or the already suggested 
>>> "as"...
>> 
>> Since it is a pseudo variable declaration, I would assume VAR syntax and
>> just use ":" ?
> 
> That would be consistent with "On E:Exception do writeln(E.message)".

No, because "On E: Exception" says that "E" is of the type "Exception", just 
like in a variable declaration the expression after the colon also identifies 
the type. Here it's not about defining the type, but about making a symbol 
equivalent to repeating a non-type expression. So "=" from symbolic constant 
declarations would probably be closest. I think ":=" is less good, because ":=" 
implies that a copy or an assignment is made rather than an equivalence is 
defined, and hence changes to that copy could be assumed lost afterwards in 
case of records or objects, which would not be the case.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to