Weird Compiler Bug in Dynamic-4GL
Posted in 1998
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01BDC219.15E2D4C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This is weird. The following program will not compile in Dynamic-4GL:
DATABASE fms
MAIN
DEFINE i SMALLINT
FOR i =3D 1 TO 10
END FOR
UPDATE systables SET tabname =3D "sometable"
END MAIN =20
It produces the error:
DATABASE fms
MAIN
DEFINE i SMALLINT
FOR i =3D 1 TO 10
END FOR
UPDATE systables SET tabname =3D "sometable"| A grammatical error has been found near "FOR UPDATE".
| The construct is not understandable in its context.
| See error number -2018.
END MAIN =20
It compiles properly under classic 4GL.
I placed a dummy statement like LET i =3D i on the line after the
END FOR statement and it compiled fine.
Candy
--
Candy McCall
ONLINE Computing, Inc.
(candym@olcinc.com)
------=_NextPart_000_0005_01BDC219.15E2D4C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#d8d0c8>
<DIV><FONT color=3D#000000 size=3D2>This is weird. The following =
program will=20
not compile in Dynamic-4GL:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>DATABASE=20
fms<BR>MAIN<BR> DEFINE i=20
SMALLINT</FONT> </DIV>
<DIV><FONT color=3D#000000 =
size=3D2> FOR i=20
=3D 1 TO 10<BR> END=20
FOR<BR> UPDATE systables SET =
tabname =3D=20
"sometable"<BR>END=20
MAIN &nb=
sp; &nbs=
p;  =
; =20
</FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>It produces the error:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>DATABASE=20
fms<BR>MAIN<BR> DEFINE i=20
SMALLINT</FONT> </DIV>
<DIV><FONT size=3D2> FOR i =3D =
1 TO=20
10<BR> END=20
FOR<BR> UPDATE systables SET =
tabname =3D=20
"sometable"<BR>| A grammatical error has been found near =
"FOR=20
UPDATE".<BR>| The construct is not understandable in its =
context.<BR>| See=20
error number -2018.<BR>END=20
MAIN &nb=
sp; &nbs=
p;  =
;=20
</FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>It compiles properly under classic 4GL.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>I placed a dummy statement like LET i =3D i on the =
line after=20
the</FONT></DIV>
<DIV><FONT size=3D2>END FOR statement and it compiled =
fine.</FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Candy</FONT></DIV>
<DIV><FONT size=3D2></FONT><FONT color=3D#000000 size=3D2>--<BR>Candy =
McCall<BR>ONLINE=20
Computing, Inc.<BR>(<A=20
href=3D"mailto:candym@olcinc.com">candym@olcinc.com</A>)</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0005_01BDC219.15E2D4C0--