Adriaan van Os wrote:
The following was initially discovered by Gale Paeper.
[...]
In other words, {$local R-} disables range-checking for the rest of the file when using --range-checking as a command-line option, not when using {$R+}. I can hardly imagine this is intended behaviour.
Of course not. It's a bug, and it's related to the fact that $R+ doesn't exactly correspond to --range-checking, but to --range-and-object-checking which in turn corresponds to --range-checking plus --object-checking. This is because unfortunately BP coupled these two unrelated checks to the same option (as they had only short options and there are only 26 letters ...)
The following patch shold fix the problems reported (gale12[a-h].pas). However, the problem in somewhat deeper, which shows when mixing both kinds (only range,, and range + objects) such as {$R-,range-checking}, as shown in gale12i.pas (added by myself). With some planned preprocessor changes (make $local work on the internal options structure directly, rather than on textual options, as was required with the external preprocessor), this will be fixed for free, so I won't spend time on a work-around now ...
Frank