- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We've implemented a hudge program with mixed languages in MSDEV (Microsoft Powerstation Fortran). The main language is Fortran (about 1400 files) and the co-language is C (about 400 files).
After portation to the Visual Studio 2005 (solution with 2 projects, C-files in static library) we tried to compile with Fortran Compiler 10.1 Thereon we've got in the Fortran subroutine:
subroutine send_phasenknoten ()
c ----------------------------------------------------------------------
implicit none
include "aliases.f"
include "new_commands.com"
include "sdv.com"
include "intv.com"
include "phasen.rec"
integer blen, i, j, laenge, opos
character bkopf*12, kuerzel*21, baum*41
c --------------------------------------------------------------------------
call init_pha_str ()
opos = sdb_pos
sdb_pos = 5
call mk_baumkopf (bkopf, blen)
do i = 1, phasen_free-1, phasen_reclen
do j = 1, phasen_reclen
ph_phasenrecord(j) = phasen(i+j-1)
enddo
if (ph_baum(1:blen) .eq. bkopf(1:blen) .and. laenge(ph_baum) .eq. blen+4) then
if (ph_inbetrieb .lt. intv_bis .and. ph_ausserdienst .gt. intv_von) then
write (baum, '(2A)') ph_baum(1:blen+4), char(0)
j = laenge (ph_phasenkuerzel)
write (kuerzel, '(2A)') ph_phasenkuerzel(1:j), char(0)
call add_pha_str (kuerzel, j)
call add_pha_str (baum, j)
endif
endif
enddo
sdb_pos = opos
call send_pha_str ()
c --------------------------------------------------------------------------
return
end
following failure-report below:
Compiling with Intel Fortran Compiler 10.1.029 [IA-32]...
ifort /nologo /debug:full /Od /I"../INC" /gen-interfaces /extend_source:132 /fpscomp:filesfromcmd /fpscomp:ioformat /fpscomp:ldio_spacing /fpscomp:logicals /fpscomp:general /warn:interfaces /module:"C:\jurij\Merkur450\Debug/" /object:"C:\jurij\Merkur450\Debug/" /traceback /check:bounds /libs:dll /threads /dbglibs /4Yportlib /c /extfor:f /Qvc8 /Qlocation,link,"C:\Programme\Microsoft Visual Studio 8\VC\bin" "C:\jurij\Merkur450\v450\send_phasenknoten.f"
C:\jurij\Merkur450\v450\send_phasenknoten.f(33) : Error: A RETURN statement is invalid in the main program.
Juri
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We've implemented a hudge program with mixed languages in MSDEV (Microsoft Powerstation Fortran). The main language is Fortran (about 1400 files) and the co-language is C (about 400 files).
After portation to the Visual Studio 2005 (solution with 2 projects, C-files in static library) we tried to compile with Fortran Compiler 10.1 Thereon we've got in the Fortran subroutine:
subroutine send_phasenknoten ()
c ----------------------------------------------------------------------
implicit none
include "aliases.f"
include "new_commands.com"
include "sdv.com"
include "intv.com"
include "phasen.rec"
integer blen, i, j, laenge, opos
character bkopf*12, kuerzel*21, baum*41
c --------------------------------------------------------------------------
call init_pha_str ()
opos = sdb_pos
sdb_pos = 5
call mk_baumkopf (bkopf, blen)
do i = 1, phasen_free-1, phasen_reclen
do j = 1, phasen_reclen
ph_phasenrecord(j) = phasen(i+j-1)
enddo
if (ph_baum(1:blen) .eq. bkopf(1:blen) .and. laenge(ph_baum) .eq. blen+4) then
if (ph_inbetrieb .lt. intv_bis .and. ph_ausserdienst .gt. intv_von) then
write (baum, '(2A)') ph_baum(1:blen+4), char(0)
j = laenge (ph_phasenkuerzel)
write (kuerzel, '(2A)') ph_phasenkuerzel(1:j), char(0)
call add_pha_str (kuerzel, j)
call add_pha_str (baum, j)
endif
endif
enddo
sdb_pos = opos
call send_pha_str ()
c --------------------------------------------------------------------------
return
end
following failure-report below:
Compiling with Intel Fortran Compiler 10.1.029 [IA-32]...
ifort /nologo /debug:full /Od /I"../INC" /gen-interfaces /extend_source:132 /fpscomp:filesfromcmd /fpscomp:ioformat /fpscomp:ldio_spacing /fpscomp:logicals /fpscomp:general /warn:interfaces /module:"C:jurijMerkur450Debug/" /object:"C:jurijMerkur450Debug/" /traceback /check:bounds /libs:dll /threads /dbglibs /4Yportlib /c /extfor:f /Qvc8 /Qlocation,link,"C:ProgrammeMicrosoft Visual Studio 8VCbin" "C:jurijMerkur450v450send_phasenknoten.f"
C:jurijMerkur450v450send_phasenknoten.f(33) : Error: A RETURN statement is invalid in the main program.
Juri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would guess that one of the include files has an END statement that makes all the following code look like part of a main program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/895D6060305DF45A57FACF854B5A8CD1/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page