Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. NikolaStarcevic

    EXIT LABELED DO LOOP FORTRAN 90

    XWB, I want to print first occurence and to exit loop just after. I will try Salgerman's solution now, it look it work ok. Thank you very much.
  2. NikolaStarcevic

    EXIT LABELED DO LOOP FORTRAN 90

    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...
  3. NikolaStarcevic

    EXIT LABELED DO LOOP FORTRAN 90

    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...
  4. NikolaStarcevic

    EXIT LABELED DO LOOP FORTRAN 90

    I just tryed that but nothing happends... loop continues...
  5. NikolaStarcevic

    EXIT LABELED DO LOOP FORTRAN 90

    btw, I tryed also IF(condition) CYCLE, IF(condition) ENDDO, IF(condition) GOTO 1, IF(condition) GOTO 2, IF(condition) GOTO END, IF(condition) END PROGRAM RBX, IF(condition).
  6. NikolaStarcevic

    EXIT LABELED DO LOOP FORTRAN 90

    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...
  7. NikolaStarcevic

    array of dot positions

    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
  8. NikolaStarcevic

    array of dot positions

    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...

Part and Inventory Search

Back
Top