/* ** Program ExPrintCSV ** ** Purpose: ** Example creating CSV tables ** ** Version: ** 2 Simplified ** ** Author: ** Charles Bos ** ** Date: ** 3/3/2012 */ #include #include #include main() { decl aPrFmt, arLabs, acLabs, mX, iK, mY; // Get the data from the database iK= 3; mX= rann(iK, 1000); mY= meanr(mX)~varr(mX)~limits(mX')[:1][]'; aPrFmt= {"%7.3f", "%7.3f", "%7.3f"}; acLabs= {"R1", "R2", "R3"}; arLabs= {"mu", "S2", "min", "max"}; // Print the table to screen println ("Using simpler printcsv format"); printcsv("exprinttex", "%cf", aPrFmt, "%c", acLabs, "%r", arLabs, mY'); printcsv("%cf", aPrFmt, "%c", acLabs, "%r", arLabs, mY'); }