- 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
It's an extension, related to the STRUCTURE/RECORD statements, which predate F90's derived type (See this).
You should avoid it, since it leads to ambiguities. You can put spaces around %, in order to make it more readable (e.g.: pp % constants = pp % coefs), or play with your editor's settings in order to change the color of % to light gray or something.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's an extension, related to the STRUCTURE/RECORD statements, which predate F90's derived type (See this).
You should avoid it, since it leads to ambiguities. You can put spaces around %, in order to make it more readable (e.g.: pp % constants = pp % coefs), or play with your editor's settings in order to change the color of % to light gray or something.
- 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
>>You can put spaces around %, in order to make it more readable (e.g.: pp % constants = pp % coefs), or play with your editor's settings in order to change the color of % to light gray or something.
I hadn't thought of this. The % is kind of annoying to me because it makes for me a non-visual seperation between the type variableand member variable within the type. That was why I prefer(ed) to use ".", for portability reasons I am now using %.
I haven't experimented with color highlighting... good idea. Would you know if you can set an alternate point size for %? This would be an IDE visual effect thing and not an embedded html point specification in the source file. % in comments would be displayed in normal point size/color...
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's an IDE/Editor related effect, and doesn't affect the source file.
If I recall correctly, the Visual Studio classifies % as "Fortran operator", so you can change the color (and font size) for that one (under Tools>Options>Environment>Fonts and Colors or something similar, depending on the version). The change applies to ALL THE OPERATORS, which is fine in some other cases, such as // ---but the VS assumes that C++'s definition of operators applies everywhere, so parenthesis, comma and semicolon are affected as well.
The Eclipse IDE should have something similar (although, I bet it's extremely complicated to setup), since Intel's debugger already uses a special color for %.
Vim has a fortran.vim file for the language syntax, and a somename.vim file for the coloring ---minimal knowledge of regular expressions is required, though.
GTK-based text editors, use GtkSourceView's definition files (fortran.lang for the language syntax and somename.xml for coloring styles; quite similar to Vim's, but xml-based).
Emacs is still a mistery to me, so...

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