File SHUF1.FT (FORTRAN source file)

Directory of image this file is from
This file as a plain text file

C	SUBROUTINE SHUFL - - NO LIMIT ON ARRAY SIZE
C PARAMETERS AS IN SHUF1
	SUBROUTINE SHUF1(IAR,M,N,KTRL)
	DIMENSION IAR(1)
	IF (KTRL)300,300,400
 300	CALL SRAND
	KTRL=1
 400	NP1=N+1
	NM1=N-1
	DO 1000 K1=1,NM1
	I1=(K1-1)*M+1
	L=RAND(0)*FLOAT(NP1-K1)+FLOAT(K1)
	I2=(L-1)*M+1
	DO 500 K2=1,M
	J1=I1+K2-1
	J2=I2+K2-1
	ITEMP=IAR(J1)
	IAR(J1)=IAR(J2)
	IAR(J2)=ITEMP
 500	CONTINUE
 1000	CONTINUE
	RETURN
	END



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search