Télécharger menug.eso

Retour à la liste

Numérotation des lignes :

menug
  1. C MENUG SOURCE GOUNAND 26/07/30 21:15:07 12611
  2. C demande un choix dans une liste.
  3. C
  4. C
  5. SUBROUTINE MENUG
  6. IMPLICIT INTEGER(I-N)
  7.  
  8. -INC PPARAM
  9. -INC CCOPTIO
  10. -INC CCNOYAU
  11. -INC SMLMOTS
  12. external long
  13. dimension iob(21)
  14. character*500 choix
  15. character*72 choixe
  16. character*8 typ(21)
  17. character*72 messag
  18. call lircha(messag,0,iretou)
  19. if (iretou.eq.0) messag='Dans menu'
  20. llong=22
  21. choix='Quitter'
  22. typ(1)='MOT'
  23. * d'abord recuperer les noms a proposer
  24. * On peut avoir soit une liste de noms soit un LISTMOTS(modif 12/98)
  25. call quetyp(typ(2),0,iretou)
  26. if (typ(2).eq.'LISTMOTS') then
  27. call lirobj(typ(2),iret,1,iretou)
  28. mlmots=iret
  29. segact mlmots
  30. nbmots=min(mots(/2),20)
  31. do 5 i=1,nbmots
  32. typ(i+1)='MOT'
  33. choix(i*llong+1:i*llong+llong)=mots(i)
  34. 5 continue
  35. i=nbmots+1
  36. segdes mlmots
  37. else
  38. do 10 i=2,21
  39. choix(i*llong+1:i*llong+llong)=' '
  40. call quetyp(typ(i),0,iretou)
  41. if (iretou.eq.0) goto 11
  42. if (typ(i).eq.'MOT') then
  43. call lircha(choix((i-1)*llong+1:(i-1)*llong+llong),1,iretou)
  44. else
  45. call lirobj(typ(i),iob(i),1,iretou)
  46. call quenom(choix((i-1)*llong+1:(i-1)*llong+llong))
  47. endif
  48. ** llong=max(long(choix(i)),llong)
  49. 10 continue
  50. 11 continue
  51. i=i-1
  52. endif
  53. CALL TRINIT(25,DIOCA2,DIOCA2,TITREE,0.15,.TRUE.,NCOUMA)
  54. call trclik(1)
  55. 30 continue
  56. CALL MENU(choix,i,LLONG)
  57. call trmess(messag(1:long(messag)))
  58. CALL TRaff(ICLE)
  59. * write(6,*) ' icle apres traff ',icle
  60. irep=icle+1
  61. if (irep.eq.-1) goto 30
  62. if (typ(irep).eq.'MOT') then
  63. choixe=choix((irep-1)*llong+1:(irep-1)*llong+llong)
  64. call ecrcha(choixe)
  65. else
  66. call ecrobj(typ(irep),iob(irep))
  67. endif
  68. end
  69.  
  70.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales