By default, the compiler doesn't generate code to check the ranges of array indices, enumeration types, subrange types, etc. Specifying the f$R+g switch tells the computer to generate code to check these indices. If, at run-time, an index or enumeration type is speci ed that is out of the declared range of the compiler, then a run-time error is generated, and the program exits with exit code 201. This can happen when doing a typecast (implicit or explicit) on an enumeration type or subrange type.
The f$RANGECHECKS OFFg switch tells the compiler not to generate range checking code. This may result in faulty program behaviour, but no run-time errors will be generated.
Remark:The standard functions val and Read will also check ranges when the call is compiled in f$R+g mode.