Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 29-01-2009
Member
 
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!
Reply With Quote
  #2  
Old 29-01-2009
Member
 
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.
Reply With Quote
  #3  
Old 29-01-2009
Member
 
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
Reply With Quote
  #4  
Old 29-01-2009
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Problem with User Breakpoint in Fortran"
Thread Thread Starter Forum Replies Last Post
Internet Explorer 9 64 bit:? The exception breakpoint (0x80000003) occured in the application at location 0xff5c87bb? Edgar Arular Technology & Internet 5 17-03-2011 10:53 AM
Fortran compilation problem under Mac Rubero Software Development 7 25-09-2010 09:17 PM
Intel Fortran problem with intel9 Anja Software Development 3 23-09-2010 08:04 PM
problem installing intel fortran compiler on Mac Pro Hibiscus5 Motherboard Processor & RAM 3 22-09-2010 01:41 PM
Problem in Fortran code ISAIAH Software Development 5 15-01-2010 10:47 AM


All times are GMT +5.5. The time now is 05:22 AM.