Yes, but they might also be less readable/maintainable.
Actually, I /did/ built a preprocessor system with multiple
levels of macros myself. Here are some examples of the
source code (to judge their readability for the uninitiated):
This shows a function definition: It will write the
declaration to the header file and write the definition to
the implementation file. So one needs to change the
prototype only once in the source - not twice (in the header
file and in the implementation file):
@[h@*h
wchar_t * kdtxuc( register wchar_t * target, register const wchar_t * source )
@]¨#=writehead @=h@:h libkcfh libkc.c¨$[libkc.c
{ register wchar_t * result = target; while( *target++ = *source++ ); return result; }
$]libkc.c
The next example shows two blocks, labeled by an automatic
counter c (whose value is not visible here). The »¨@=@+c«
inserts the next block at this position, so:
@[@*c
{ IPersistFile * ppf;
hres = psl->lpVtbl->QueryInterface( psl, &IID_IPersistFile, &ppf );
if( SUCCEEDED( hres ))
{ @=@+c
¨ppf~>Release()¨; }
else{ printf( "QueryInterface failed, rc(%x),%x\n", hres, GetLastError()); }}¨@]
@[@*c
{ WORD wsz[ MAX_PATH ]; MultiByteToWideChar( CP_ACP, 0, LinkName, -1, wsz, MAX_PATH );
hres = ¨ppf~>Save( wsz, TRUE ); }¨@]
becomes
@[@*c
{ IPersistFile * ppf;
hres = psl->lpVtbl->QueryInterface( psl, &IID_IPersistFile, &ppf );
if( SUCCEEDED( hres ))
{ { WORD wsz[ MAX_PATH ]; MultiByteToWideChar( CP_ACP, 0, LinkName, -1, wsz, MAX_PATH );
hres = ¨ppf~>Save( wsz, TRUE ); }¨
¨ppf~>Release()¨; }
else{ printf( "QueryInterface failed, rc(%x),%x\n", hres, GetLastError()); }}¨@]
Thus, one can write (deeply) nested blocks as a /sequence/ of blocks.
It seems that ¨...¨ also means something. Possibly, it will
expand enclosed ¨~>¨ to something, but what this is, I have
forgotten now. Maybe ¨ppf~>Release()¨ became ¨Release( ppf )«?