home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Between Heaven & Hell 2
/
BetweenHeavenHell.cdr
/
100
/
49
/
pcstat3.for
< prev
next >
Wrap
Text File
|
1986-04-06
|
2KB
|
76 lines
$DEBUG
PROGRAM PCSTAT3
C
C ********************************************************
C * *
C * STATISTICAL CODE/TEXT ANALYSIS v1.0 *
C * (C) COPYRIGHT RICHARD NOLEN COLVARD Apr-86 *
C * COMMERCIAL RIGHTS RESERVED *
C * MICROSOFT (MS FORTRAN V3.3) *
C * *
C ********************************************************
C
INTEGER*2 IERR,J,J1,CR
INTEGER*4 COUNTS(256),TOTAL
CHARACTER*1 CARD(128)
DATA COUNTS /256 * 0/
DATA IERR /0/, TOTAL/0/, CR/013/
C
C
WRITE(*,10)
10 FORMAT(10X,'PC-CODE3 STATISTICAL ANALYSIS v1.0',//)
20 FORMAT(10X,'(c) Copyright R. Nolen COLVARD Company 1986')
22 FORMAT(10X,' Commercial Rights Reserved')
24 FORMAT(10X,'(c) Copyright Microsoft Corp 1985')
26 FORMAT(10X,' Microsoft FORTRAN V3.3',//)
WRITE(*,20)
WRITE(*,22)
WRITE(*,24)
WRITE(*,26)
C
C
WRITE(*,29)
29 FORMAT(5X,'Please Enter the CODE or TEXT file to analysis')
WRITE(*,31)
31 FORMAT(5X,'Enter an Input FILE name:',/)
C
C
OPEN(5,FILE=' ',FORM='FORMATTED',ACCESS='SEQUENTIAL',
+ STATUS='OLD')
C
C
400 FORMAT(5X,/)
WRITE(*,400)
75 CONTINUE
70 FORMAT(128A1)
DO 76 J=1,128
76 CARD(J) = CHAR( CR )
C
C
READ(5,70,END=199) CARD
C
DO 80 J=1,128
IJ = ICHAR( CARD(J) ) + 1
IF (IJ .EQ. 14) GOTO 75
COUNTS(IJ) = COUNTS(IJ) + 1
TOTAL = TOTAL + 1
80 CONTINUE
C
GOTO 75
C
C
199 DO 200 J=1,256
IF (COUNTS(J) .GT. 0) THEN
J1 = J - 1
WRITE(*,90) J1, CHAR(J1), COUNTS(J)
ENDIF
200 CONTINUE
90 FORMAT(5X,I4,3X,A1,3X,I5)
C
C
CLOSE(7)
900 FORMAT(2X,//,5X,'*** STATITICAL TESTS COMPLETED ***',//)
WRITE(*,900)
STOP
END