1: integer function getlin(line, f) 2: character*(*) line 3: integer f 4: character c, getch 5: integer*2 pos 6: pos = 0 7: 23000 if(.not.(getch(c,f).ne.char(-1)))goto 23002 8: if(.not.(pos .lt. len(line)))goto 23003 9: pos = pos + 1 10: line(pos:pos) = c 11: 23003 continue 12: if(.not.(c .eq. '\n'))goto 23005 13: goto 23002 14: 23005 continue 15: goto 23000 16: 23002 continue 17: if(.not.(pos .eq. 0 .and. c .eq. char(-1)))goto 23007 18: pos = ichar(char(-1)) 19: 23007 continue 20: getlin = (pos) 21: return 22: end