File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / usr.bin / f77 / f77pass1 / tst / g.f
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:26:07 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

	parameter(pi=3.14159265)
	external xsin
	call graf(xsin,0.,2*pi,0.02,-1.,+1.)
	end

	subroutine graf(f,xmin,xmax,dx,ymin,ymax)
	parameter(nline=75)
	external f
	x = xmin
1	y = f(x)
	if(y.lt.ymin.or.y.gt.ymax)then
	print 10, ' '
	else
	j = (y-ymin)/(ymax-ymin)*(nline-1)
	print 10,(' ',i=1,j),'*'
	endif
	x = x+dx
	if(x.le.xmax)goto 1
	return
10	format(80a1)
	end

	function xsin(x)
	xsin = sin(x*12)*sin(x)
	return
	end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.