Template Question Regarding Global Includes

Good Day Everyone!

Question about Templates

I know how to add an Include file in %AfterGlobalIncludes.

However, how can I check if an Include file is already “included?”

Thank you!

Hi Don,
in #AT(%BeforeGenerateApplication) using this logic

#ADD(%GlobalIncludeList,‘ShThread.inc’)

The templates will handle only generating the INCLUDE statement once for you.

1 Like

Actually, looking at the ABC templates it does not do anything to check if the file is already in the list. I was always under the impression that it did.

This is incorrect. See posts below.

Hi Rick,

Isn’t %GlobalIncludeList multivalued and UNIQUE and both Clarion and ABC have code like this…

#FOR(%GlobalIncludeList)
INCLUDE(‘%(UPPER(CLIP(%GlobalIncludeList)))’),ONCE
#ENDFOR

Oops, you’re right it is UNIQUE. Clearly I should pay more attention before I post.
I thought it took care of it. I was right but then 2nd guessed myself, oh well.
Thanks, Graham.