How to check if a file is already included?

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 24, 2017.

  1. fdantas

    fdantas Administrator Moderador

    I have a procedure structure like this:

    <someprocedure.p>
    <randomCode>
    <INCLUDE standardIncludeFile.i>
    </someprocedure>


    The standardIncludeFile.i-include file can be used with any procedure files. However, it requires other include files to work. F.ex. stantarderror.i and standardconstants.i.

    If the someprocedure.p already has included these 2 files, they shouldn't be included in the standardIncludeFile.i. If they're not, they should be included in the standardIncludeFile.i.

    Can I use DEFINED inside the standardIncludeFile.i to check if those .i-files are already included in the someprocedure.p?

    If I use INCLUDE anyway without any conditions, the Eclipse Open-Edge editor gives me the setting to include once, but I'm not sure if that's a good way. The files are compiled on the server for production, anyway.

    Currently stantarderror.i or standardconstants.i do not contain any GLOBAL-DEFINED constants, so I cannot check them that way with DEFINED.

    Continue reading...

Compartilhe esta Página