C COPYRIGHT (C) 1983 GLENN EVERHART
C PERMISSION IS GIVEN TO ANYONE TO USE, DISTRIBUTE, OR COPY THIS
C PROGRAM FREELY BUT NOT TO SELL IT COMMERICALLY.
C$ INDEX	- FIND THE LOCATION OF A CHARACTER WITHIN A STRING 
C SLIGHTLY MODIFIED FROM THE USUAL DEFINITION FOR PORTACALC
      INTEGER FUNCTION INDEX ( STR, C ) 
C
      LOGICAL * 1 C, STR ( 1 )
C
C LIMIT RANGE OF SEARCH TO 512 BYTES. THIS IS ARBITRARY BUT I DOUBT
C VIZIKLUGE WILL EVER DEAL IN LONGER STRINGS THAN THIS AND
C SEARCHES ALL OVER THE CREATION ARE TO BE AVOIDED.
      DO 20019  I = 1, 512
      IF (.NOT.( STR ( I ) .EQ. 0 )) GOTO 20021 
C RETURN INDEX AS EITHER THE LOCATION OF THE CHARACTER OR OF THE
C END OF THE STRING FOR VIZIKLUGE. NOTE THAT THIS DIFFERS
C FROM USUAL RATFOR VERSION.
      INDEX=I
      RETURN
20021 CONTINUE
      IF (.NOT.( STR ( I ) .EQ. C )) GOTO 20023 
      INDEX = ( I ) 
      RETURN
20023 CONTINUE
20022 CONTINUE
C
20019 CONTINUE
20020 CONTINUE
      END 
      INTEGER FUNCTION ISGN(IARG)
      InTEgeR*4 IARG
      IF(IARG.EQ.0)ISGN=0
      IF(IARG.GT.0)ISGN=1
      IF(IARG.LT.0)ISGN=-1
      RETURN
      END
