C
C This file is issued from the MODULEF library, but has been 
C subsequently modified
C
      SUBROUTINE FONINT(IMODE,MEXP,MI,MR,ML,MC,MD,MOPN,ICODE)
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C           S.P. FONINT          (FONCTIONS INTERPRETEES)
C           -----------
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C BUT :
C     INTERPRETER UNE FONCTION
C
C PARAMETRES D ENTREE :
C     IMODE   : 1 INTERPRETATION PAS A PAS, SUR LES TYPES SEULEMENT
C             : 0 INTERPRETATION COMPLETE,  SUR LES TYPES ET LES VALEURS
C     MEXP    : PILE DES EXPRESSIONS
C     MI,MR,ML,MC,MD : TABLE DES CONSTANTES ENTIERES, REELLES, ...
C     MOPN    : PILE DES OPERANDES
C
C PARAMETRES DE SORTIE :
C     ICODE   : CODE DE RETOUR (VOIR LE S.P. FONERR)
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C PROGRAMMEUR : PATRICK LAUG ; INRIA (3) 954 90 20 POSTE 508
C ......................................................................
      INTEGER MEXP(*),MI(*)
      REAL    MR(*)
      LOGICAL ML(*)
      INTEGER MC(*)
      DOUBLE PRECISION MD(*)
      DIMENSION MOPN(*)
      COMMON /FONLC / LCI,LCR,LCL,LCC,LCD,LCOPN,LCOPT,LCSYM,LCEXP,LCIDN
      COMMON /FONLM / LMI,LMR,LML,LMC,LMD,LMOPN,LMOPT,LMSYM,LMEXP,LMIDN
C
C PASSAGE A L INSTRUCTION SUIVANTE
      ICODE = 0
      GOTO 110
  100 IF (IMODE.NE.0) RETURN
  110 LCEXP  = LCEXP + 1
      NEXP = MEXP(LCEXP)
      GOTO (210,220,230,240,250), NEXP/10 000
C
C IDENTIFICATEUR OU MOT-CLE
  210 CONTINUE
  220 CONTINUE
      ICODE = 15
      RETURN
C
C CONSTANTE
  230 LCOPN = LCOPN + 1
      IF (LCOPN.GT.LMOPN) THEN
         ICODE = 16
         RETURN
      END IF
      MOPN(LCOPN) = NEXP
      GOTO 100
C
C OPERATEUR ARITHMETIQUE
  240 IPARIT = (NEXP - 40 000) / 1000
      IF (IPARIT.EQ.1) THEN
         CALL FONOP1(NEXP-41 000, IMODE, MOPN, MI,MR,ML,MC,MD,ICODE)
      ELSE IF (IPARIT.EQ.2) THEN
         CALL FONOP2(NEXP-42 000, IMODE, MOPN, MI,MR,ML,MC,MD,ICODE)
      ELSE
         ICODE = 15
      END IF
      IF (ICODE.NE.0) RETURN
      GOTO 100
C
C INSTRUCTION DE COMMANDE
  250 IF (NEXP .EQ. 50 001) GOTO 100
      IF (NEXP .EQ. 50 002) RETURN
      ICODE = 15
      END
