[fpc-devel] Re: [Lazarus] Syntax highlighting anomalies

Juha Manninen (gmail) juha.manninen62 at gmail.com
Sat Oct 9 10:22:59 CEST 2010


On Saturday 09 October 2010 09:51:59 Alexander Klenin wrote:
> On Sat, Oct 9, 2010 at 14:24, Hans-Peter Diettrich <DrDiettrich1 at aol.com> 
wrote:
> >> break, continue and exit are not keywords. They could be
> >> redefined.
> > 
> > I'd appreciate when, at least in mode FPC, these words would become
> > keywords. As already mentioned, a redefinition of these procedures can
> > only cause trouble. When they occur in legacy code, it would do no harm
> > when such modules had to be compiled in an different (Delphi) mode.
> 
> Yes, this would be a good change, similar to restrictiions on the duplicate
> variable names in the overlapping scopes.
> I think, however, that this change has near-zero chance of
> getting through fpc core team.

I would vote for this this, too. Maybe nobody asked the fpc core team, so I 
cross-post this also to fpc-devel list.
I just realized how important the duplicate variable name restriction is when 
I tried to convert some existing code. Clearly the original author didn't 
always know which variable gets used.

Juha


> One relevant data point: for many years,
> I use Delphi for the "Programming 101" university course I teach.
> Every year, out of approx. 15 students in the group, 5-6 make the mistake
> of naming some component or variable "exit" or "break", and spend
> hours or even days trying to find the problem, until they finally give
> up and ask me for help.
> 
> -- 
> Alexander S. Klenin



More information about the fpc-devel mailing list