Range checking is not currently implemented in GPC. There has been debate in the past about what priority to give this and just who is willing to do it.
However, IMHO, GPC should at least allow the range checking directive to be used, even if it doesn't do anything. I expect this oversight will be addressed in the near future.
Joe.
-----Original Message----- From: Kresimir Veselic [SMTP:Kresimir.Veselic@FernUni-Hagen.de] Sent: Thursday, July 18, 2002 6:37 PM To: gpc@gnu.de Subject: range checking in GPC
Dear GPC-ers,
Upon including a range checking directive in the program
program test1; {$R+} const nmax = 6; type nrange = 1..nmax; var n : nrange; begin read(n); writeln(n); end.
and compiling with
gpc --borland-pascal test1.p
the compiler answers:
test1.p:2: warning: unknown compiler directive `r+'
My questions: (i) In the gpc manual on p. I read ... "all of BP compiler directives are supported by GPC..." {$R+} is one of them. Why the reaction above?
(ii) is there any possibility of range checking with GPC? I could not find the expression "range checking" in the manual text.
Thanks in advance, K. Veselic.