Sven Barth schrieb:

you can see the following example

     with new_patient: new, old_patient: old do begin
       new.LastName := 'Smith';
[...]

Not only the ":" look a bit strange (it remembers me a bit of the on-clause in except blocks though), but also - and more importantly - the order: first the variable or expression that is to be "shortened" and then the new identifier for it.

This IMO is due to LL(1), where optional parts deserve a characteristic prefix, which can be combined easily with a separator token. Above snippet would read much more strange as e.g.

      with :new new_patient, :old old_patient do begin

It might look clearer as

      with new_patient as new, old_patient as old do begin

but most probably the "as" was not already a recognized token in that language.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to