- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello sir
I have problems in programming, after I run there is some error # 5078 (Unrecognized token ' ` ' skipped) and # 5082 (Syntax error, found IDENTIFIER 'USERCONSTITUTIVEINPUTS' when expecting one of: ( % [ . = =>), I do not know what to do because I was very new in the programming language Fortran.
I attach the image screenshot
thanks ...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is the quote character that you are using; the "backwards quote" is not recognized by the compiler as a valid character.
Please modify the program to either use the "forward quote", or to use a double-quote character.
Let us know if that does not work, OK?
--Lorri
- 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
& is a continuation character used in free format fortran (.f90 files). In fixed format which you are using you have a character in column 6 (e.g. 1-9 or a-z) to indicate it is continued. I would expect if the & is in column 6 that is not an allowed character (a long time since I used fixed format....)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ampersand (&) character is not in column 6 and thus is not being treated as a continuation character as you wanted but rather a label. Add a space to the left of it to move it into column 6. When you are editing under the VS editor, look to the bottom right corner of the Visual Studio IDE. There you will see line (Ln) and column (Col) information representative of where your cursor is sitting. If you select the & under the source editor that will give you an indication of its column position.
Another of the Doctor's useful articles, Doctor Fortran in "Source Form Just Wants to be Free"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please, an & in column 6 is not only OK for fixed source form, it's recommended.
Why?
Back in the day when you wanted to use an include file for both fixed and free source form and you had long lines in the include file, you would build it with an ampersand in column 6 so the fixed source would recognize it and an ampersand in column 73 so that the free source would recognize it.
I have an extensive bit of fixed and free source for an application, and all my line continuations in the fixed are & and all my line continuation in the free (must be) &. The compiler has no problem with this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have to say I have not written any fixed form for many years and I could not tell from the screen grab if the & was in 6 or not and was also not aware if that was legal or not in fixed. Clearly it is!
On a side note I find fixed form really awful to look at and have an uncontrollable urge to convert it. Yes I know if it ain't broke leave it alone...... but free form was standard more than 25 years ago now and programs can be reliably converted automatically.... just saying.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Agustinus S.: Please post the source code as text, either using the {...} button in the toolbar, next to Omega, or zip up the source files and attach the zip. Image files are next to useless when one needs to count column positions or extract the text for further analysis.
I think that the problem is that your continuation character '&' is in column 7 rather than in column 6, where it should be. I say this because the '&' is directly above the 'r' in the 'return' a few lines below. Again, your choice of an image file is unfortunate because it seems to have an extra blank column to the left of column-1, where the comment character 'C' is expected.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page