My solution to this is to put important commas at the level of the enclosing fence. Here is an example -- notice that the commas separating the IF blocks are at the level of the IF statement, and the same for TRY
Names Default to Here( 1 );
dt = Current Data Table();
Try(
If( Contains( dt << Get Column Names, As Name( "height" ) ),
mean = Col Mean( dt:height );
max = Col Max( dt:height );
min = Col Min( dt:height );
std dev = Col Std Dev( dt:height );
Write( "\!NSome stats on :HEIGHT:",
"\!NMin: ", min,
"\!NMax: ", max,
"\!NMean: ", mean,
"\!NStd Dev: ", std dev
)
,
Contains( dt << Get Column Names, As Name( "weight" ) ),
mean = Col Mean( dt:weight );
max = Col Max( dt:weight );
min = Col Min( dt:weight );
std dev = Col Std Dev( dt:weight );
Write( "\!NSome stats on :WEIGHT:",
"\!NMin: ", min,
"\!NMax: ", max,
"\!NMean: ", mean,
"\!NStd Dev: ", std dev
)
,
Contains( dt << Get Column Names, As Name( "age" ) ),
mean = Col Mean( dt:age );
max = Col Max( dt:age );
min = Col Min( dt:age );
std dev = Col Std Dev( dt:age );
Write( "\!NSome stats on :AGE:",
"\!NMin: ", min,
"\!NMax: ", max,
"\!NMean: ", mean,
"\!NStd Dev: ", std dev
)
,
Print( "Cannot find columns 'height', 'weight', or 'age'" )
)
,
Print( "mistakes were made" )
)
Jordan