#-h- echo.r 738 asc 07-may-80 15:32:38 #-h- main 275 asc 07-may-80 15:32:31 #--------------------------------------------------------------------- # include symbol definitions # include symbols #--------------------------------------------------------------------- ## echo -- main program # call initr4 # call echo # call endr4 # end #-h- echos 365 asc 07-may-80 15:32:32 ## echo - echo command line arguments # subroutine echo subroutine main integer getarg, i character buf(MAXLINE) for (i=1; getarg(i, buf, MAXLINE) != EOF; i=i+1) { if (buf(1) == QMARK & buf(2) == EOS) call error('usage: echo [args].' ) call putlin (buf, STDOUT) call putch (BLANK, STDOUT) } if (i != 1) call putch (NEWLINE, STDOUT) return end