Return to printSVector.ccc CVS log | Up to [local] / OpenXM / src / k097 / lib |
File: [local] / OpenXM / src / k097 / lib / Attic / printSVector.ccc (download)
Revision 1.1.1.1 (vendor branch), Fri Oct 8 02:12:15 1999 UTC (24 years, 10 months ago) by maekawa
o import OpenXM sources |
Println("printSVector.ccc 1996, 8/17"); def printSVector(keys) { local i,j,n,max,width,m,k,kk,tmp0; n = Length(keys); max = 0; for (i=0; i<n; i++) { if (Length(keys[i]) > max) { max = Length(keys[i]); } } /* Println(max); */ max = max+3; width = 80; m = 0; while ((m*max) < 80) { m = m+1; } k = 0; kk = 0; for (i=0; i<n; i++) { Print(keys[i]); kk = kk+1; k = k+Length(keys[i]); tmp0 = max-Length(keys[i]); for (j=0; j < tmp0 ; j++) { k = k+1; if (kk < m) {Print(" ");} } if (kk >= m) { kk = 0; k=0; Ln(); } } Ln(); /* Println(keys); */ }