× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Simon,

Ah yes - you *can* indent, but only if you're indenting within /free and
/end-free. However, there's nothing to stop you putting /FREE and /END-FREE
round your /COPY statements, whether they're in the middle of your D-spec or
whatever. Now this is only, obviously, of use if you're going to do a bunch
of conditional-compilation statements on their own and then some simple ones
later, but this would work:

/FREE
/IF DEFINED(COND1)
/IF DEFINED(X)
/DEFINE X1
/ELSEIF DEFINED(Y)
/DEFINE Y1
/ELSE
/DEFINE ONLY1
/ENDIF
/ELSEIF DEFINED(COND2)
/IF DEFINED(X)
/DEFINE X2
/ELSEIF DEFINED(Y)
/DEFINE Y2
/ELSE
/DEFINE ONLY2
/ENDIF
/ELSE
/IF DEFINED(X)
/DEFINE ONLYX
/ELSEIF DEFINED(Y)
/DEFINE ONLYY
/ELSE
/DEFINE NOTHING
/ENDIF
/END-FREE
/IF DEFINED(X1)
D doStuff PR EXTPROC('function4')
/ENDIF
/IF DEFINED(Y1)
D doStuff PR EXTPROC('function4')
/ENDIF
/IF DEFINED(ONLY1)
D doStuff PR EXTPROC('function1')
/ENDIF
/IF DEFINED(X2)
D doStuff PR EXTPROC('function4')
/ENDIF
/IF DEFINED(Y2)
D doStuff PR EXTPROC('function4')
/ENDIF
/IF DEFINED(ONLY2)
D doStuff PR EXTPROC('function2')
/ENDIF
/IF DEFINED(ONLYX)
D doStuff PR EXTPROC('function4')
/ENDIF
/IF DEFINED(ONLYY)
D doStuff PR EXTPROC('function4')
/ENDIF
/IF DEFINED(NOTHING)
D doStuff PR EXTPROC('function3')
/ENDIF

It's really ugly, but of course, you could stick it all in a copybook :-)

BTW, I assume this is just an example, because the above version could be
massively simplified - if X is ever defined, doStuff is function4 etc.

Rory

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.