Development Topics > BASIC Extensions > A-Shell Extensions > INCLUDE++
One-Time ++Includes

++include'once <fspec>

This directive acts just like the regular ++include, except that if the specified file has already been included in the current compilation, then it is skipped. This largely solves the problem—introduced by nesting—of accidentally including the same file twice. In fact, in most cases you may want to just use ++include'once all the time. It is somewhat unlikely that you would deliberately want to include the same file twice, but one possibility would be a set of map statements that you want to use locally within multiple functions.

To help you visually confirm the operation of skipping redundant ++includes, the compiler will indicate them as in this example:

Phase 1 - Initial work memory is 16944 bytes

        Copying from ASHELL.DEF[907,16]

        Copying from SQL.DEF

        Copying from FNSQLCON.BSI

        Copying from FNSQLSTATE.BSI

        Skipping sql.def (already included)

          Copying from FNEXTCH.BSI[907,10]

        Copying from FNSQLATR.BSI

        ...