# putstr - write string str to file f in field width >= w include ratdef subroutine putstr(str, w, f) character str(MAXLINE) integer w, f, len, i, length len = length(str) if (w >= 0) # right-justified for (i = len + 1; i <= w; i = i + 1) call putch(BLANK, f) for (i = 1; str(i) ^= EOS; i = i + 1) call putch(str(i), f) if (w < 0) # left-justified for (i = len + 1; i <= -w; i = i + 1) call putch(BLANK, f) return end