- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PROGRAM TestL integer :: outlu outlu = 12 open (outlu,file='test.dxf', status='new',form='formatted') write(outlu,91000) 0,' LINE' write(outlu,91000) 8,' SOLID1B' write(outlu,91000) 6,' CONTINUOUS' write(outlu,91000) 62,' 2' 91000 format (i3,/,a) 91001 format (i2,/,f15.3) stop END PROGRAM
I get the following compile errors :
jetto.f90(8) : Error: Syntax error, found IDENTIFIER 'WRITE' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
jetto.f90(8) : Error: Syntax error, found INTEGER_CONSTANT '8' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
jetto.f90(10) : Error: Syntax error, found FORMAT_INTEGER '91001' when expecting one of:
It may be Ihave nothad enough coffee, but I can't see what I am doing wrong!
Les
PS
If I change thewrite statementsto :
write(outlu,91000) (0,' LINE')
write(outlu,91000) (8,' SOLID1B')
write(outlu,91000) (6,' CONTINUOUS')
write(outlu,91000) (62,' 2')
then I get the following compile error message :
jetto.f90(8) : Error: Syntax error, found FORMAT_INTEGER '91001' when expecting one of:
Which implies a problem with the two format statements? (Note the use of the "/" edit descriptor to output a new line between the two items in the i/o list.
Les
Message Edited by Les_Neilson on 05-15-200604:12 AM
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I comment out the second format it compiles ok with or without the ( ) around the i/o list.
(I am trying to debuga geometry problem andam trying to write out that part of the model dataas a dxf file which I can view in a dxf viewer.)
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
0 LINE 8 SOLID1B 6 CONTINUOUS 62 2
Maybe you have some extra characters somewhere that are not listed. For example if I add an '&' thus:
write(outlu,91000) 0,' LINE' &
write(outlu,91000) 8,' SOLID1B'
C:F90DFformatformat.f90(32) : Error: Syntax error, found IDENTIFIER 'WRITE' when expecting one of: ( * :: ,; : ) + . - (/ [ ] /) ' ** / > // ... write(outlu,91000) 8,' SOLID1B' ---------^ C:F90DFformatformat.f90(32) : Error: Syntax error, found INTEGER_CONSTANT '8' when expecting one of: ( * :: , ; : ) + . - % (/ [ ] /) . ' ** / > ... write(outlu,91000) 8,' SOLID1B' -
Message Edited by anthonyrichards on 05-15-200605:09 AM
- 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
Thank you Steve.
I opened the source file in vi and immediately saw that the write and format statements were each one long line.There were control-M's but no line feed. It looked ok in the IDE editor.
As soon as I corrected the line feeds it compiled correctly.
I like vi :-)
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Les,
Looks like you are importing source code from a Mac (which uses Return without LineFeed). A friend of mine uses Mac and I use Windoz. So I use a set of edit macros to clean up the source code whenever I receive files.
Other areas your may have problems with are the continuation lines in DATA blocks. Just something of a heads up.
Jim Dempsey
- 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
- 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
Just for information :
We are all on XP with Visual Studio IDEhere.
I happen to have cygwin with vi installed as a personal preference. (My previous job started out using unix, migrated to windows and I took vi with me!)
I amat the momentworking on two versions of our code (current and next release) For current (bugfixing)I generally work in the IDE for quicker build-debug cycle, and for next releaseI usevi for quicker code writing (and the ide for thebuild).I had been doing a lot of cut and paste between themall and somewhere along the way "lost" the LF on some lines. By that time I was in the IDE building various solutions. The files "looked" ok in the IDE, and I didn't think to check them in vi until Steve mentioned sending a zip file where he could examine the binary/hex values. And voila I saw the error of my ways.
Les
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page