error when compiling a program with global module consisting object variable

Iwan AB <[email protected]> Tue, 8 Aug 2023 18:42:16 +0700
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAHJCSmJzVGfTNbAFr0oy3VLMHAXs9U2U6BJ+9qqfVZFd6b3GVA@mail.gmail.com>
--===============8302164271896643073==
Content-Type: multipart/alternative; boundary="0000000000007dcbf7060267db9c"

--0000000000007dcbf7060267db9c
Content-Type: text/plain; charset="UTF-8"

Dear Mike,

Can an object variable be defined in a global module?
This code produces the following error when compiling.

GLOBALS "glob_conn.4gl"
MAIN
    CALL p_init()
END MAIN
FUNCTION p_init()
    LET gconn = clsConnection.new()
|_____________________________^
| Error at line 6, character 31
| Is not an object type, or variable does not exist (clsconnection)
END FUNCTION

the glob_conn.4gl consist the following code:
#glob_conn.4gl
GLOBALS
DEFINE  gconn object(clsConnection)
END GLOBALS

assuming that I have the clsConnection class object module named
p_clsConnection.4gl

Best regards,

Iwan

--0000000000007dcbf7060267db9c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Dear Mike,<br><div><br></div><div><div>Ca=
n an object variable be defined in a global module?</div><div>This code pro=
duces the following error when compiling.</div><div><br></div><div><font fa=
ce=3D"monospace">GLOBALS &quot;glob_conn.4gl&quot;=C2=A0</font></div><div><=
font face=3D"monospace">MAIN</font></div><div><font face=3D"monospace">=C2=
=A0 =C2=A0 CALL p_init()</font></div><div><font face=3D"monospace">END MAIN=
</font></div><div><font face=3D"monospace">FUNCTION p_init()</font></div><d=
iv><font face=3D"monospace">=C2=A0 =C2=A0 LET gconn =3D clsConnection.new()=
</font></div><div><font face=3D"monospace">|_____________________________^<=
/font></div><div><font face=3D"monospace">| Error at line 6, character 31</=
font></div><div><font face=3D"monospace">| Is not an object type, or variab=
le does not exist (clsconnection)</font></div><div><font face=3D"monospace"=
>END FUNCTION</font></div><div><font face=3D"monospace"><br></font></div><d=
iv><font face=3D"monospace">the glob_conn.4gl consist the following code:</=
font></div><div><font face=3D"monospace">#glob_conn.4gl</font></div><div><f=
ont face=3D"monospace">GLOBALS</font></div><div><font face=3D"monospace">DE=
FINE=C2=A0 gconn object(clsConnection)</font></div><div><font face=3D"monos=
pace">END GLOBALS</font>=C2=A0</div><div><br></div><div>assuming that I hav=
e the clsConnection class object module named p_clsConnection.4gl=C2=A0</di=
v><div><br></div><div>Best regards,</div><div><br></div><div>Iwan</div></di=
v></div></div>

--0000000000007dcbf7060267db9c--


--===============8302164271896643073==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8302164271896643073==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss

--===============8302164271896643073==--