include ratfor.def /************************************************************************ * outch -output a single character * ************************************************************************/ subroutine outch(c) character c include outbuf.cmm if(outp >= 72) [ #column 72 begins comments call outdon do outp = 1,5 outbuf(outp) = SPACE outbuf(6)=STAR outp = 6 ] outp=outp+1 outbuf(outp)=c return end /************************************************************************ * outstr -output a number of characters * ************************************************************************/ subroutine outstr(string) character string(1) len=length(string) #look for length for(i = 1;i <= len;i=i+1) call outch(string(i)) return end /************************************************************************ * outcon -outputs 'n continue' * * * * useage: call outdon(labval) * * where: labval =the value of the number that is to be the * * label. If labval <= 0 no label is generated * ************************************************************************/ subroutine outcon(n) integer n if(n > 0)call outnum(n) call outtab call outstr('CONTINUE') call outdon return end /************************************************************************ * outdon -actually write out a line * * This routine actually writes out the line followed by a tab, * * an exclamation mark, and the line number. * ************************************************************************/ subroutine outdon include lineno.cmm #line numbers include outbuf.cmm #actual characters to write include getlin.cmm #unit number here outbuf(outp+1) = tab outbuf(outp+2) = bang #exclamantion mark call ita(lineno(lun),outbuf(outp+3)) #convert to ascii outp = length(outbuf) #find end write(OUTLUN,100)(outbuf(i),i=1,outp) 100 format(OUTBUFSIZE a1) outp=0 return end /************************************************************************ * outgo -generates go to n * ************************************************************************/ subroutine outgo(n) integer n define GOTO 'GOTO' call outtab call outstr(GOTO) call outnum(n) call outdon return end /************************************************************************ * outnum -write out a number * * * * useage: call outnum(number) * ************************************************************************/ subroutine outnum(number) integer number character string(20) call ita(number,string) do i=1,100 [ if(string(i) == EOS)return call outch(string(i)) ] return end /************************************************************************ * outtab -generate a tab * ************************************************************************/ subroutine outtab include outbuf.cmm while(outp <= 6) call outch(SPACE) return end