* dm24: STB-23 program define t_fval local table $S_t local f = `table'_F[`1',`2'] local s = mod(`f',4096) local font = mod(int(`f'/4096),8) if (`s' == 0) { global S_1 /* in expression */ global S_2 /* format */ global S_3 /* value */ global S_4 0 /* to quote */ exit } if (`font'==1) { global S_1 "in green" } else if (`font'==2) { global S_1 "in yellow" } else if (`font'==3) { global S_1 "in white" } else if (`font'==4) { global S_1 "in blue" } else if (`font'==5) { global S_1 "in red" } if (`s' == 1) { global S_2 local i = `table'_M[`1',`2'] if (`i'!=0) { local z `table'_`i' global S_2 = "$`z'" } /* What about global format for table? !! */ /* Give precidence to column format. Is this correct? */ local zz `table'_R`1' local z `table'_C`2' if ("$`z'"!="" | "$`zz'"!="") { local z "$`z'" if ("`z'"=="") { local z "$`zz'" } local z `table'_`z' global S_2 = "$`z'" } if ("$S_2"=="") { if (`4'==3) { global S_2 "%`3'.`5'f" } else { global S_2 "%`3'.0g" } /* format */ global S_3 "`table'_V[`1',`2']" /* value */ global S_4 0 /* to quote */ } else { local y = substr("$S_2",2,.) local i = index("`y'",".") if (`i'==0) { local i = max(index("`y'","s"),index("`y'","f"),index("`y'","g")) } local y = substr("`y'",1,`i'-1) local y = `3' - `y' + 1 global S_3 : display _col(`y') $S_2 `table'_V[`1',`2'] global S_4 1 global S_2 } } else { local v `table'_`s' local c = `3'-length("$`v'")+1 if (`c'<1) { local c 1 } global S_2 /* format */ global S_3 : di _col(`c') "$`v'" /* value */ global S_4 1 /* to quote */ } end