MIKROM
this command STOP did good job. Yet there is one problem, it literaly stop program :) i cant put entire code in main loop:
program stop_example
integer :: i, j
DO 1 X=1,10,1
do i = 1, 5, 1
do j = 1, 10, 1
write(*,'("i = ", I2, ", j = ", I2)') i, j
if...
XWB,
my condition was IF (Z.GT.0), so it should stop loop when 1st value of Z greater than zero is found, but it just stop writing Z after that first value and continue loop. I also tryed bunch of other conditions and exactly same happends when condition is satisfied.
Just dont know what to do...
OK guys, this is funny....
I have nested DO LOOP:
PROGRAM RBX
IMPLICIT REAL*8 (A-H,O-Z) !variables that start with letter a,b,c,d,e,f,g,h,o,p,q,r,t,s,... are doubles
DO 1 I=1,5,1
DO 2 J=1,10,1
Z(I,J)=(some very complicated mathematics)
WRITE(*,*) Z(I,J)
2 CONTINUE
1 CONTINUE
END PROGRAM...
Dots are positions of atoms in face centered cubic crystal structure, but in certain directions.
Part of code that I copy/paste is [100] direction, and one I need is [111] direction.
But I already did it myself.
Thanks
Hello,
I am new to fortran. I have a task to do.
I have code for making grid of positions (X and Y coordinates) with two DO loops:
PROGRAM Dot_Coordinates
IMPLICIT NONE
INTEGER :: IMAX,IMIN,JMAX,JMIN, NN, MM, I, J, K, A1, M
INTEGER, DIMENSION (500) :: XX,YY...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.