I see this script has no Expr() expression, but fold the needed content together.
Do you know how to group all the needed group by one time? Is "O-dtManu" is the "Folding Keywords". ?
Can you show a example of how to realize below fold job?
****You can use below 3 group as a example show to me. Thank you very much.
Names Default To Here( 1 );
Print( "load Func_DT.jsl-------------------" );
New Namespace(
"O_dtManu"
);
//close files with similar names
O_dtManu:closefile = Function( {fn},
{Default local},
Try( Close( Data Table( fn ), nosave ) );
For( i = 2, i < 30, i++,
Try( Close( Data Table( fn || " " || Char( i ) ), nosave ), Break() )
);
);
O_dtManu:closefilelist = Function( {fnlist},
{Default local},
ncnt = N Items( fnlist );
For( i = 1, i <= ncnt, i++,
fn = fnlist[i];
Try( Close( Data Table( fn ), nosave ), Try( fn << close window ) );
For( j = 2, j < 30, j++,
Try( Close( Data Table( fn || " " || Char( j ) ), nosave ), Break() )
);
);
);
//fill missing cell with 0
O_dtManu:fill_miss_0 = Function( {dt, start_col, fillin = 0},
{Default Local},
ncnt = N Cols( dt );
For( k = start_col, k <= ncnt, k++,
dt_col_type = Column( dt, k ) << get data type();
If( dt_col_type == "Numeric",
For( j = 1, j <= N Rows( dt ), j++,
If( Is Missing( Column( dt, k )[j] ),
Column( dt, k )[j] = fillin
)
)
);
);
);