On Fri, 7 Aug 1998, Candy McCall wrote:
> This is weird. The following program will not compile in Dynamic-4GL:
>
> DATABASE fms
> MAIN
> DEFINE i SMALLINT
> FOR i = 1 TO 10
> END FOR
> UPDATE systables SET tabname = "sometable"
> END MAIN>
> It produces the error:
>
> DATABASE fms
> MAIN
> DEFINE i SMALLINT
> FOR i = 1 TO 10
> END FOR
> UPDATE systables SET tabname = "sometable"> | A grammatical error has been found near "FOR UPDATE".
> | The construct is not understandable in its context.
> | See error number -2018.
> END MAIN
>
> It compiles properly under classic 4GL.
>
> I placed a dummy statement like LET i = i on the line after the
> END FOR statement and it compiled fine.
I've verified this and it is now logged as PTS Bug B98507. Candy, what
platform are you working on? Manufacturer, model (it doesn't have to be
exact), O/S name and version, please.
As you can see, the compiler appears to be treating 'FOR UPDATE' as a
composite keyword, rather than recognizing 'END FOR'. There used to be a
similar bug in I4GL where a CREATE TABLE statement followed by a LOCK
statement would not compile because the compiler assumed the LOCK was part
of LOCK MODE { ROW | PAGE }, a bug which is fixed in 7.20 I4GL (and
possibly earlier).
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix v0.59 -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn