![]() |
|
#1
|
|||
|
|||
|
problem with goto
I write a program to beter see the comand goto;
It is a program read a number X , till X is less than 0 then it is invalid, so where is the problem in my code? where is the error? code: program GO TO implicit none 10 print*,'entrer la valeur de X' read* ,X IF(X.LT. 0) then print*,'INvalide' GO TO 10 else print*,'valide' END IF END |
|
#2
|
|||
|
|||
|
problem with goto
Yuo must change the name of program
you as used "Implicic none" then all variable must be declared for exemple program pippo implicit none real*8 X 10 print*,'entrer la valeur de X' read(*,*) X IF(X.LT. 0) then print*,'INvalide' GO TO 10 else print*,'valide' END IF END hi!! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|