C EXAMPLE PROGRAM OF FILE MANAGEMENT ROUTINES
C
C THIS IS A WATRAN PROGRAM, DO NOT USE WITH F4 COMPILER
C
      REAL HIT(9),GOOD(5),TOO(5),ARRAY(2,5),BRAY(2,5)
      INTEGER FIRST,IVECT(1000)
      COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
C
C FORMAT 'TEXT' DATA STATEMENTS*
C
      DATA HIT(1),HIT(2),HIT(3),HIT(4),HIT(5),HIT(6),
     9HIT(7),HIT(8),HIT(9)/5H
     1(1H ,,5H5HHIT,5H C,5H,5HONTRO,5H,5HL ,5HP, ,5,
     75HHGING,5HE,4HR,4HLY!)/
      DATA GOOD(1),GOOD(2),GOOD(3),GOOD(4),GOOD(5)/5H
     2(20HG,5HOOD B,5HOY...,5H.GIRL,5H????)/
      DATA TOO(1),TOO(2),TOO(3),TOO(4),TOO(5)/5H(20HT,
     35HOO HA,5HRD, T,5HRY AG,5HAIN!)/
      FIRST=1
      CALL CLEAR(.TRUE.)
C
C INITIALIZE SCREEN CO-ORDINATE SYSTEM
      XMIN=0
      XMAX=50
      YMIN=0
      YMAX=50
C
C CREATE A SQUARE
C
      ITAG=1
      ARRAY(1,1)=10.
      ARRAY(2,1)=30.
      ARRAY(1,2)=20
      ARRAY(2,2)=30.
      ARRAY(1,3)=20.
      ARRAY(2,3)=40.
      ARRAY(1,4)=10.
      ARRAY(2,4)=40.
      ARRAY(1,5)=10.
      ARRAY(2,5)=30.
C
C DISPLAY THE SQUARE
C
      CALL VECTOR(3,ARRAY,1,5,IVECT,FIRST,LAST,7,0,.FALSE.)
      CALL DSPLAY(6,ITAG,IERROR,IVECT,FIRST,LAST)
C DISPLAY THE TEXT MATERIAL IN THE HIT ARRAY
C
      ITAG=2
      CALL TEXT(2,ITAG,511,716,7,1,HIT)
C
C CREATE THE SECOND SQUARE:
      ITAG=3
      BRAY(1,1)=40.
      BRAY(2,1)=20.
      BRAY(1,2)=30.
      BRAY(2,2)=20.
      BRAY(1,3)=30.
      BRAY(2,3)=10.
      BRAY(1,4)=40.
      BRAY(2,4)=10.
      BRAY(1,5)=35.
      BRAY(2,5)=13.
C
C WAIT FOR A CONTROL P TO BE TYPED (^P):
      PAUSE1
      FIRST =LAST +1
      CALL VECTOR(3,BRAY,1,5,IVECT,FIRST,LAST,7,2,.FALSE.)
      CALL DSPLAY(3,1,IERROR)
      CALL DSPLAY(6,ITAG,IERROR,IVECT,FIRST,LAST)
      ITAG=4
C
C DISPLAY THE NEXT DISPLAY LINE
      CALL TEXT(3,2)
      CALL TEXT(2,ITAG,511,102,7,2,TOO)
      DO 200 I=1,5
200   ARRAY(2,I)=ARRAY(2,I)-10.
C
C WAIT AROUND FOR THE SECOND CONTROL P:
      PAUSE2
      ITAG=5
      FIRST=LAST+1
      CALL VECTOR(3,ARRAY,1,5,IVECT,FIRST,LAST,7,0,.FALSE.)
      CALL DSPLAY(3,3,IERROR)
      CALL DSPLAY(6,ITAG,IERROR,IVECT,FIRST,LAST)
      ITAG=6
      CALL TEXT(3,4)
      CALL TEXT(2,ITAG,204,306,7,0,GOOD)
C
C THIS IS A DISPLAY TIME LOOP, JUST WAITS FOR AWHILE:
C
      DO 300 I=1,100000
300   CONTINUE
      STOP
      END
