#include_optional functional backport
Functional backport of #include_optional from MQ2Next. Design was focused on minimal disruption to the MQ2 Live code base.
Usage: #include_optional <name of include that may or may not exist>.inc
It is the responsibility of the macro author to determine if subroutines exist or not before calling any subroutines that may be in an optional include.
Notes for this merge:
- Design was focused on minimal changes to current MQ2 functionality
- All non-shared file opens were not modified
- An additional Include flag allowed for minimal disruption to the code base to avoid rippling changes
- A more "elegant" solution already exists in MQ2Next.
Test Macro:
#include First.inc
#include_optional Second.inc
#include_optional Missing.inc
Sub Main
/call First
/call Second
/if (${SubDefined[MissingOptionalInclude]}) /call MissingOptionalInclude
/return
Edited by Dr. Whom