Bonjour,

Suite à la réalisation d'un exemple de ce site : http://perso.mines-albi.fr/~gaborit/...an-node10.html

dont voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
 
      parameter (mligne=50, mcolon=80) 
 
      double precision a(mligne, mcolon) 
      double precision b(mligne, mcolon) 
      double precision c(mligne, mcolon) 
 
      integer nligne, ncolon 
 
      write(*,*) 'Nombre de lignes des matrices' 
      read(*,*) nligne 
      write(*,*)  'Nombre de colonnes des matrices' 
      read(*,*) ncolon 
 
      write(*,*) 'Matrice a ' 
      do i=1,nligne 
        read(*,*) (a(i,j), j=1,ncolon) 
      enddo 
 
      write(*,*) 'Matrice b ' 
      do i=1,nligne 
        read(*,*) (b(i,j), j=1,ncolon) 
      enddo 
 
      do i=1,nligne 
        do j=1,ncolon 
          (i,j)=a(i,j)+b(i,j) 
        enddo 
      enddo 
 
      end
j'obtiens le message d'erreur suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
script.f90:28.10:
 
          (i,j)=a(i,j)+b(i,j) 
          1
Error: Unclassifiable statement at (1)
Je débute sur Fortran et je ne comprend pas très bien ce qui n'est pas correct.

Voici la version de fortran que j'ai :

GNU Fortran (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
et voici la commande que j'utilise pour compiler ce script :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
gfortran -o script script.f90
Merci d'avance pour votre aide.