C MENUG SOURCE GOUNAND 11/04/21 21:15:24 6946 C demande un choix dans une liste. C SUBROUTINE MENUG IMPLICIT INTEGER(I-N) -INC CCOPTIO -INC SMLMOTS external long dimension iob(22) character*16 choix(22) character*8 typ(22) character*72 messag call lircha(messag,0,iretou) if (iretou.eq.0) messag='Dans menu' llong=8 choix(1)='Quitter' typ(1)='MOT' * d'abord recuperer les noms a proposer * On peut avoir soit une liste de noms soit un LISTMOTS(modif 12/98) call quetyp(typ(2),0,iretou) if (typ(2).eq.'LISTMOTS') then call lirobj(typ(2),iret,1,iretou) mlmots=iret segact mlmots nbmots=min(mots(/2),21) do 5 i=1,nbmots typ(i+1)='MOT' choix(i+1)=mots(i) llong=max(long(choix(i+1)),llong) 5 continue i=nbmots+1 segdes mlmots else do 10 i=2,22 choix(i)=' ' call quetyp(typ(i),0,iretou) if (iretou.eq.0) goto 11 if (typ(i).eq.'MOT') then call lircha(choix(i),1,iretou) else call lirobj(typ(i),iob(i),1,iretou) call quenom(choix(i)) endif llong=max(long(choix(i)),llong) 10 continue 11 continue i=i-1 endif CALL TRINIT(25,DIOCA2,DIOCA2,TITREE,0.15,.TRUE.,NCOUMA) 30 continue CALL MENU(choix,i,LLONG) call trmess(messag(1:long(messag))) CALL TRaff(ICLE) irep=icle+1 if (irep.eq.-1) goto 30 if (typ(irep).eq.'MOT') then call ecrcha(choix(irep)(1:long(choix(irep)))) else call ecrobj(typ(irep),iob(irep)) endif end