[fpc-pascal] a proposal about "with" syntax

Sven Barth pascaldragon at googlemail.com
Mon Mar 18 14:42:19 CET 2013


Am 18.03.2013 10:36 schrieb "Xiangrong Fang" <xrfang at gmail.com>:
>
> 2013/3/18 Marco van de Voort <marcov at stack.nl>
>>
>> In our previous episode, Xiangrong Fang said:
>> > > In our previous episode, Xiangrong Fang said:
>> > > > Alternatively, how about just use SPACE to separate the token?
i.e.:
>> > > >
>> > > > with SomeObject o1, SomeOtherObject o2 do....
>> > >
>> > > That's perfectly fine for C. But this isn't C.
>> >
>> > What's wrong here? In pascal, we also see space used in similar way:
>>
>> Never between type and variable/alias name and never in the order
>> type[space]variable
>
>
> This is not the case, as the thing before space is NOT a type but a
variable.   In my feeling things un-pascal is extensive use of "weird"
symbols... :-)
>
> I cannot recall if there is already a notion of "alias" in free pascal,
if not then we just introduce this idea within the scope of "with"
expression.

Which is why I suggested "absolute" as this already carries the note of "a
is the same as b".

Though considering that we already have an "alias" token that would also be
an alternative...

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130318/e6ed0e1f/attachment.html>


More information about the fpc-pascal mailing list