C
C This file is issued from the MODULEF library, but has been 
C subsequently modified
C
      SUBROUTINE FONNRR(MI,MR,ML,MC,MD,MOPN,MEXP,NBPARA,X,Y,Z,R,ICODE)
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C           S.P. FONNRR          (FONCTIONS INTERPRETEES)
C           -----------
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C BUT :
C     EXECUTER UNE FONCTION AYANT DE 0 A 3 PARAMETRES REELS
C     ET UN RESULTAT REEL
C
C PARAMETRES D ENTREE :
C     MI,MR,ML,MC,MD : TABLE DES CONSTANTES ENTIERES, REELLES, ...
C     MOPN    : PILE DES OPERANDES
C     MEXP    : PILE DES EXPRESSIONS
C     NBPARA  : NOMBRE DE PARAMETRES EFFECTIVEMENT UTILISES
C     X,Y,Z   : PARAMETRES DE LA FONCTION (EVENTUELLEMENT INUTILISES)
C
C PARAMETRES DE SORTIE :
C     R       : RESULTAT DE LA FONCTION
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
C
C 0 PARAMETRE D'ENTREE
      LCOPN = 0
      IF (NBPARA.LE.0) GOTO 100
C
C 1 PARAMETRE D'ENTREE
      LCEXP = LCEXP + 1
      NEXP = MEXP(LCEXP)
      IF (NEXP / 1000 .NE. 32) THEN
         ICODE = 27
         IF (NEXP .EQ. 50 001) ICODE = 29
         RETURN
      END IF
      LCOPN = LCOPN + 1
      MOPN(LCOPN) = NEXP
      MR(NEXP - 32 000) = X
      IF (NBPARA.EQ.1) GOTO 100
C
C 2 PARAMETRES D'ENTREE
      LCEXP = LCEXP + 1
      NEXP = MEXP(LCEXP)
      IF (NEXP / 1000 .NE. 32) THEN
         ICODE = 28
         IF (NEXP .EQ. 50 001) ICODE = 29
         RETURN
      END IF
      LCOPN = LCOPN + 1
      MOPN(LCOPN) = NEXP
      MR(NEXP - 32 000) = Y
      IF (NBPARA.EQ.2) GOTO 100
C
C 3 PARAMETRES D'ENTREE
      LCEXP = LCEXP + 1
      NEXP = MEXP(LCEXP)
      IF (NEXP / 1000 .NE. 32) THEN
         ICODE = 3
         IF (NEXP .EQ. 50 001) ICODE = 29
         RETURN
      END IF
      LCOPN = LCOPN + 1
      MOPN(LCOPN) = NEXP
      MR(NEXP - 32 000) = Z
C
C VERIFICATION DU NOMBRE DE PARAMETRES D'ENTREE
  100 LCEXP = LCEXP + 1
      IF (MEXP(LCEXP) .NE. 50 001) THEN
         ICODE = 29
         RETURN
      END IF
C
C RESULTAT
      CALL FONINT(0,MEXP,MI,MR,ML,MC,MD,MOPN,ICODE)
      IF (ICODE.NE.0) RETURN
      IF (MOPN(LCOPN) / 1000 .NE. 32) THEN
         ICODE = 30
         RETURN
      END IF
      R = MR(MOPN(LCOPN) - 32 000)
      ICODE = 0
      END
