Max wrote:
> How hard would it be for the Editor to implement something like disabling formatting between compiler directives such as, #if def _PASSTHROUGHFUNCTION and its #endif statements just as it does between /* comments */, etc. This would, IMHO, eliminate the problems we see when some C code is introduced in an FB file that has statements like "while", "do", "for", etc. that cause way to many vertical lines that don't have a closing statements like "wend", "until" and "next", etc. that is typical for C code.
Until someone comes up with a fix, one workaround is to append an "int wend;" line for each indent level, just before the #endif:
'---------------
#if def _PASSTHROUGHFUNCTION
void Test( void ) {
int i;
while ( 1 == 0 ) {
}
for ( i = 0; i < 10; i++ ) {
}
}
int wend;// cancel the 'while' indent
int wend;// cancel the 'for' indent
#endif
toolbox Test
fn Test()
'---------------
Bernie