-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
enhancementAn enhancement or new featureAn enhancement or new featuregood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from community
Description
In modern fortran you can set the kind of intrinsic data type. It means you can define additional intrinsic data type. When you do so, for literal constants you have to use the kind name attached to literal consonant using under score.
Example
PROGRAM test_initial
INTEGER, PARAMETER :: DBL = SELECTED_REAL_KIND(p=13)
REAL(KIND=DBL) :: a1 = 6.666666666666666
REAL(KIND=DBL) :: a2 = 6.666666666666666_DBL
WRITE (*,*) a1, a2
END PROGRAM test_initialHighlight.js issue
When using highlight.js to highlight a Fortran code contains such named constant, highlight.js fails to do the job! It highlights the remaining code (from the position of named constant) in a wrong way!
Note
- The above code in this post is highlighted by github, it works correctly! See the name constant is in blue color.
- other intrinsic data can have other kind. But in all cases in named constants, the kind is specified by an underscore to the constant (e.g
12_ps)
Metadata
Metadata
Assignees
Labels
enhancementAn enhancement or new featureAn enhancement or new featuregood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from community