- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm got a code on internet that make otimization but my compiler is setting the following fragment with a error. Someone know how can I fix it?
Sorry for my english.
do i=1,nlin if (barra_f(i) .gt. barra_i(i)) then A(nger+1+cont1,nger+barra_i(i)+1) = lineX(barra_i(i), barra_f(i)) A(nger+1+cont1,nger+barra_f(i)+1) = -lineX(barra_i(i), barra_f(i)) else A(nger+1+cont1,nger+barra_i(i)+1) = -lineX(barra_i(i), barra_f(i)) A(nger+1+cont1,nger+barra_f(i)+1) = lineX(barra_i(i), barra_f(i)) end if A(nger+1+cont1,1) = carregamento(i) cont1=cont1+1 end do
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which line is the offending line? The error message indicates line 123, but there is no such line of course in the above fragment.
And without declarations it is a trifle difficult to diagnose errors that might come from a wrong use/declaration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler thinks the source code is fixed format, so it's ignoring characters after the first 72. One of your lines is 74 characters long.
Either change the name of the file to Simplex.f90 or compile it with the /FREE compiler switch in effect. Either choice will let the compiler know it's free format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
or change the indentation such that your source lines do not extend past column 72 (and do not use tab characters).
If you are using MS Visual Studio, columns 73 and later are highlighted with the comment color (usually green).
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page