[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with some 'End' marks
[Thread Prev] | [Thread Next]
- Subject: Re: problems with some 'End' marks
- From: BB <adamnt42@xxxxxxxxx>
- Date: Sat, 29 Mar 2025 15:31:25 +1030
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 29/3/25 2:39 pm, Benoît Minisini wrote:
Benoît, I can't agree. Anything that makes the code validity dependent on its starting point in the line just adds an impost on the coder that philosophically should not be there.Le 29/03/2025 à 03:05, BB a écrit :WHY WAS THIS DONE! Are we turning into python now? Whitespace has hitherto meant nothing.unhappy as I occassionally want to indent whole methods to make them stand out in the editor/printout.🙁bI done that to prevent an annoying mistake: if someone writes "End" instead of "End If" by mistake, the compiler emits errors hard to understand.It took me a lot of minutes to find the problem in a small function written by someone else.As "End" alone is only a keyword used for closing functions, and as functions cannot be nested, I chose to raise an error if the compiler sees "End" not at the beginning of the line.I couldn't imagine that someone will indent a whole function for any reason!Maybe I can replace that error by a warning? Or better take the entire indent into account and detect indent mismatch (beginning and end of function not with the same indent)?
Surely, the case mentioned should have issued the "If without end if" error. Did it not do so?
b
Re: problems with some 'End' marks | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
problems with some 'End' marks | Charlie Reinl <Karl.Reinl@xxxxxxxxxx> |
Re: problems with some 'End' marks | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: problems with some 'End' marks | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: problems with some 'End' marks | BB <adamnt42@xxxxxxxxx> |
Re: problems with some 'End' marks | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |