Something odd is happening with my (very basic) FORTRAN syntax highlighter. All of my keywords are stored in the syntax file in lowercase, but the file is marked as not case sensitive. I've verified that *all* of the defined keywords are properly colorized when written in lower case. However, only *most* of them are properly recognized when written in upper case. There are 16 keywords that get missed when they're written in caps, as illustrated in the attached image:
The color scheme used in the image uses black for keywords and orange for standard text (just for visual clarity). So, as you can see, all lowercase items are recognized, and all uppercase items are not. Again, I'm only showing the ones that fail to match in uppercase. All others work properly in both cases.
The keywords shown were cut/pasted directly from the syntax file, so they haven't been retyped in any way (so, no typos or strange chars).
I can provide additional files as necessary. Any ideas?
Jeff
FORTRAN keyword issues
FORTRAN keyword issues
- Attachments
-
- fortran_keyword_miss.png (7.23 KiB) Viewed 17352 times
Re: FORTRAN keyword issues
Rickard,
I thought I'd go ahead and include the above word list and the syntax files for your review.
Thanks,
Jeff
I thought I'd go ahead and include the above word list and the syntax files for your review.
Thanks,
Jeff
Code: Select all
allocatable ALLOCATABLE
allocate ALLOCATE
backspace BACKSPACE
deallocate DEALLOCATE
equivalence EQUIVALENCE
function FUNCTION
implicit IMPLICIT
include INCLUDE
interface INTERFACE
intrinsic INTRINSIC
logical LOGICAL
procedure PROCEDURE
public PUBLIC
recursive RECURSIVE
select SELECT
sequence SEQUENCE
- Attachments
-
- fortran.zip
- (1.1 KiB) Downloaded 736 times
- Rickard Johansson
- Site Admin
- Posts: 6661
- Joined: 19 Jul 2006 14:29
Re: FORTRAN keyword issues
They all contain a "C" which is used as a line comment. It seems using an alphanumeric character as line comment can interfere with keyword identification. I'll look into it.
Re: FORTRAN keyword issues
That's an interesting observation, and I think you're right with one caveat. It only seems to impact the uppercase version of keywords that *contain* a "C", though keywords that *start* with "C" are fine.Rickard Johansson wrote:They all contain a "C" which is used as a line comment. It seems using an alphanumeric character as line comment can interfere with keyword identification. I'll look into it.
Jeff
- Rickard Johansson
- Site Admin
- Posts: 6661
- Joined: 19 Jul 2006 14:29
Re: FORTRAN keyword issues
It's been fixed. I'll release a new beta so please check when available.
Re: FORTRAN keyword issues
Will do - thank you.Rickard Johansson wrote:It's been fixed. I'll release a new beta so please check when available.
Re: FORTRAN keyword issues
This seems to work exactly as expected - thanks.Rickard Johansson wrote:It's been fixed. I'll release a new beta so please check when available.