Results 1 to 4 of 4

Thread: Problem with User Breakpoint in Fortran

  1. #1
    Join Date
    Jan 2009
    Posts
    134

    Problem with User Breakpoint in Fortran

    Hello everyone,

    I have a small problem with this program. The compiler gives me zero errors and zero warning but when I go to run the .exe from my mistake.
    I am not an expert in programming but for these small programs I do, but still can not resolve till this time.

    Thanks to whoever can help me!

  2. #2
    Join Date
    Oct 2008
    Posts
    167

    Re: Problem with User Breakpoint in Fortran

    Hello, some advice if you want to increase your chances to be answered:

    1) instead of, post code directly, using the appropriate tag "CODE" to do the same.

    2) explains in detail what goes wrong and where you think may be the error.

    who knows fortran pass and give you a hand, unfortunately I do not know the language.

  3. #3
    Join Date
    Mar 2008
    Posts
    258

    Re: Problem with User Breakpoint in Fortran

    thanks for the advice!
    The problem for me is in the functions WRITE, READ and FORMAT because when I open the exe not ask me to enter the values as it should.
    This is the code

    Code:
    REAL RAPX21, LREALE, ANCONT, DANCON, OFFSET, LCALC, DIFFL, DIFFLL, PRODL 
    		  REAL EPSIL 
    		  LOGICAL Maxter 
    		  WRITE (5.1000) 
      1000 FORMAT ( 'DAMMI RAPX21 E LREALE Report to RADIUS OF WIRE') 
    		  READ (5 *) RAPX21, LREALE 
    		  WRITE (5.1001) 
      1001 FORMAT ( 'DEFINE EPSIL') 
    		  READ (5 *) EPSIL 
    		  OFFSET = 0.00001 
    		  Maxter =. FALSE. 
    		  ANCONT = ACOS (0.) 
    		  DANCON = ANCONT/25 
    		  CALL LUNCAL (EPSIL, RAPX21, ANCONT, LCALC, Maxter) 
    		  IF (Maxter) GOTO 80 
    		  DIFFL = LREALE-LCALC 
    		  WRITE (5.1004) LCALC 
      1004 FORMAT ( 'LCALC =', G10.5) 
    		  DIFFLL = DIFFL 
    		  IF ((DIFFL ** 2). LT.SCARTO) GOTO 90 
      10 CONTINUE 
    		  ANCONT = ANCONT-DANCON 
    		  CALL LUNCAL (EPSIL, RAPX21, ANCONT, LCALC, Maxter) 
    		  IF (Maxter) GOTO 80 
    		  DIFFL = LREALE-LCALC 
    		  WRITE (5.1004) LCALC 
    		  IF ((DIFFL ** 2). LT.SCARTO) GOTO 90 
    		  PRODL = DIFFL * DIFFLL 
    		  IF (PRODL.GT.0) GOTO 10 
    		  ANCONT = ANCONT + DANCON 
    		  WRITE (5.1003) ANCONT 
    		  DANCON = DANCON / 2 
    		  GOTO 10 
      80 CONTINUE 
    		  WRITE (5.1002) 
      1002 FORMAT ( 'EXCEEDED MAX NUMBER OF TERMS') 
      90 CONTINUE 
    		  WRITE (5.1003) ANCONT 
      1003 FORMAT ( 'CONTACT ANGLE (RAD) =', G10.5) 
    		  ACONGR = (90 .* ANCONT) / ACOS (0.) 
    		  WRITE (5.1005) ACONGR 
      1005 FORMAT ( 'CONTACT ANGLE (DEGREES) =', G10.5) 
    		 STOP 
    		 END 
    
    		  SUBROUTINE LUNCAL (EPSIL, X2SUX1, ANGCON, LUNG, MAXNUM) 
    		  REAL X2SUX1, ANGCON, LUNG, LUNG1, LUNG2, ALPHA, SERBS, EPSIL 
    		  REAL LLUNG, A, K2, ANGX1, INTEGR, DL 
    		  LOGICAL MAXNUM 
    		  M = 500 
    		  A = ((X2SUX1 * COS (ANGCON)) -1) / (X2SUX1-COS (ANGCON)) 
    		  K2 = ((X2SUX1 ** 2) - (A ** 2)) / (X2SUX1 ** 2) 
    		  ASIN ANGX1 = ((((X2SUX1 ** 2) -1) / (K2 * (X2SUX1 ** 2 )))** 0.5) 
    		  LUNG = 2 * ((A + X2SUX1) * ANGX1) 
    		  LLUNG = 0. 
    		  DO 20 I = 1, M 
    		  ALPHA = 0.-0.5 
    		  CALL SERBIN (I, ALPHA, SERBS) 
    		  LUNG1 = A * SERBS 
    		  ALPHA = 0.5 
    		  CALL SERBIN (I, ALPHA, SERBS) 
    		  LUNG2 * = X2SUX1 SERBS 
    		  CALL INT (ANGX1, I INTEGR) 
    		  LUNG LUNG = + (2 * ((LUNG1 + LUNG2 )*((- 1) ** I) * (K2 ** I) * INTEGR)) 
    		  DL = (LLUNG-LUNG) ** 2 
    		  IF (DL.LT.EPSIL) GOTO 30 
    		  LUNG LLUNG = 
      20 CONTINUE 
    		  MAXNUM =. TRUE. 
      30 CONTINUE 
    		 RETURN 
    		 END 
    
    		  SUBROUTINE INT (FIX1, N1, INTE) 
    		  REAL INTE, INTO, INT1, FIX1 
    		  INTO = FIX1 
    		  DO 40 K = 1, N1 
    		  INT1 =- ((COS (FIX1) * ((SIN (FIX1 ))**(( 2 * K) -1 )))/( 2 * k)) + 
    	  1 ((((2 * K) -1) * INTO) / (2 * K)) 
    		  INTO = INT1 
      40 CONTINUE 
    		  INTE = INT1 
    		 RETURN 
    		 END 
    
    		  SUBROUTINE SERBIN (N2, ALFA, Serbia) 
    		  REAL ALFA, SERBIA 
    		  Serbia = 1 
    		  DO 50 L = 1, N2 
    		  Serbia * Serbia = ((ALFA-L +1) / L) 
      50 CONTINUE 
    		 RETURN 
    		 END

  4. #4
    Join Date
    Dec 2008
    Posts
    120

    Re: Problem with User Breakpoint in Fortran

    the units' 5 does not correspond to any file for what it stops.
    you should use something like

    open (unit = 5, file = "filename.txt", form = 'formatted', status = 'replace')

    You have to learn a little 'I \ O with Fortran, began replacing the 5 with *.

    so to me seems to work

    > prog.exe
    DAMMI RAPX21 E LREALE Report to RADIUS OF THE WIRE
    .5
    .9
    DEFINE EPSIL
    .01
    EXCEEDED MAX NUMBER OF TERMS
    CONTACT ANGLE (RAD) = 1.5708
    CONTACT ANGLE (DEGREES) = 90000

Similar Threads

  1. Replies: 5
    Last Post: 17-03-2011, 10:53 AM
  2. Fortran compilation problem under Mac
    By Rubero in forum Software Development
    Replies: 7
    Last Post: 25-09-2010, 09:17 PM
  3. Intel Fortran problem with intel9
    By Anja in forum Software Development
    Replies: 3
    Last Post: 23-09-2010, 08:04 PM
  4. problem installing intel fortran compiler on Mac Pro
    By Hibiscus5 in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 22-09-2010, 01:41 PM
  5. Problem in Fortran code
    By ISAIAH in forum Software Development
    Replies: 5
    Last Post: 15-01-2010, 10:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,427,775.25902 seconds with 16 queries