Annotation of OpenXM/src/k097/lib/Old/printSVector.ccc, Revision 1.1
1.1 ! takayama 1:
! 2: Println("printSVector.ccc 1996, 8/17");
! 3:
! 4:
! 5:
! 6: def printSVector(keys) {
! 7: local i,j,n,max,width,m,k,kk,tmp0;
! 8: n = Length(keys);
! 9: max = 0;
! 10: for (i=0; i<n; i++) {
! 11: if (Length(keys[i]) > max) {
! 12: max = Length(keys[i]);
! 13: }
! 14: }
! 15: /* Println(max); */
! 16: max = max+3;
! 17: width = 80;
! 18: m = 0;
! 19: while ((m*max) < 80) {
! 20: m = m+1;
! 21: }
! 22: k = 0; kk = 0;
! 23: for (i=0; i<n; i++) {
! 24: Print(keys[i]); kk = kk+1;
! 25: k = k+Length(keys[i]);
! 26: tmp0 = max-Length(keys[i]);
! 27: for (j=0; j < tmp0 ; j++) {
! 28: k = k+1;
! 29: if (kk < m) {Print(" ");}
! 30: }
! 31: if (kk >= m) {
! 32: kk = 0; k=0; Ln();
! 33: }
! 34: }
! 35: Ln();
! 36:
! 37: /* Println(keys); */
! 38: }
! 39:
! 40:
! 41:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>