- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I correct the following error?
read(*,'(A)') filename
open(UNIT=lu, FILE=filename, STATUS='OLD', ACTION='READ',&
ISOSTAT=ierror)
C:My DocumentsFortranexer_4least_squares_fit.for(29) : Error: Syntax error, found '&' when expecting one of: * ...
open(UNIT=lu,FILE=filename,STATUS='OLD',ACTION='READ',&
What should I use instead of ?&? if I want to continue on another line?
(Visual Fortran 5.0, FORTRAN f90)
read(*,'(A)') filename
open(UNIT=lu, FILE=filename, STATUS='OLD', ACTION='READ',&
ISOSTAT=ierror)
C:My DocumentsFortranexer_4least_squares_fit.for(29) : Error: Syntax error, found '&' when expecting one of: *
open(UNIT=lu,FILE=filename,STATUS='OLD',ACTION='READ',&
What should I use instead of ?&? if I want to continue on another line?
(Visual Fortran 5.0, FORTRAN f90)
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ampersand is valid only for free source format. Make sure you are not using fixed or tab source formats. If your source has a type of .FOR try using .F90 instead.
James
James

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