- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm adding new subroutines using Fortran 90 free format to an existing Fotran 77 program. There are some common block files I want to include in the new subroutines. So I add '&' in column 73 wherever there is continuation in the common block filies. As I think Fortran 77 will ingore everything from column 73. However, I got error like:
fortcom: Error: ./COMMON/CONSPECL1.BLOCK, line 93: Syntax error, found '&' when expecting one of: // /
common /SCONINT1/spoimon1,slesid1,sptid1,spoipt1,sib11,sib12, &
------------------------------------------------------------------------^
common /SCONINT1/spoimon1,slesid1,sptid1,spoipt1,sib11,sib12, &
------------------------------------------------------------------------^
In the CONSEPCL1.BLOCK, aroud line 93 shows:
! Now gather everything into common blocks
!
common /SCONINT1/spoimon1,slesid1,sptid1,spoipt1,sib11,sib12, &
& siangl11,siangl12,siangl13,stotex1,stotspe1,sspec11, &
& stmon1,snb1,snang1,styp1,sexc11,sexc12,sspec12,snpt1, &
& lz14_1
!
common /SCONINT1/spoimon1,slesid1,sptid1,spoipt1,sib11,sib12, &
& siangl11,siangl12,siangl13,stotex1,stotspe1,sspec11, &
& stmon1,snb1,snang1,styp1,sexc11,sexc12,sspec12,snpt1, &
& lz14_1
What's wrong with it? Or what's the correct way to make CONSPECL1.BLOCK be albe to be included in both Fortran 90 and Fortran 77 source code file? I've just used Fotran 90 for two days, forgive my ignorane.
Thanks,
YS
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the probelmis probablycaused by 'tab key' betwee & and the variable name.
YS

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page