[Lazarus] Should the "at" word be painted as reserved word ?
Sven Barth
pascaldragon at googlemail.com
Wed Feb 15 15:34:53 CET 2012
Am 15.02.2012 15:32, schrieb Martin:
> On 15/02/2012 10:51, Sven Barth wrote:
>> Am 15.02.2012 11:36, schrieb Marco van de Voort:
>>> On Mon, Feb 13, 2012 at 10:25:34AM +0800, Paul Ishenin wrote:
>>>>> According to my "Sprachgef??hl" this cannot be anything other than a
>>>>> reserved word. Its not an identifier, its not an operator, it can only
>>>>> be a reserved word.
>>>>
>>>> At is not a reserved word. It works only in the context of a raise
>>>> statement.
>>>
>>> How is this different from "until" ?
>>
>> Maybe because the "at" was introduced rather late by Borland and then
>> they didn't want to break compatibility with code that uses "at" as a
>> variable or something. "until" is in the language for a long time
>> (Delphi language, not Pascal language). Same with words like "helper",
>> "read", "write", "default", "requires", "contains". They were all
>> introduced afterwards (though there seem to be exceptions, so it's not
>> easy to decide whether something is a global keyword or a context
>> sensitive one).
>
> Correct me, but
>
> var
> until: boolean;
>
> does not compile, while
>
> var
> at: boolean;
>
>
> does compile
Yes, that is correct.
Looking at my message again there might have been a misunderstanding:
"until" is in Object Pascal since the beginning, but maybe the "at" part
was introduced later. Other keywords like "helper" were also introduced
later so instead of breaking working code Borland decided to make them
"context sensitive". That's my theory for this.
Regards,
Sven
More information about the Lazarus
mailing list