在UltraEdit中高亮显示FORTRAN语法

方法应该是一样的,我的是绿色版的UltraEdit 16.00.0.1032版本,windows 7系统

打开UltraEdit所在的目录,在wordfiles此目录下新建一个文件,内容如下:

 

 

 

/L14"Fortran 90" Nocase Line Comment Num = 2!  Line Comment Alt = !! String Chars = "' DisableMLS File Extensions = F90 FOR FTN F

/Delimiters = ~ ! @%^&*()-+=|//{}[]:;"'<> ,

/Function String = "^(^{SUBROUTINE^}^{FUNCTION^}[ ^t]+[A-Z0-9_]+^)("

/Indent Strings = "THEN" "ELSE" "DO" "FORALL" "CASE"

/Unindent Strings = "ELSE" "END IF" "END DO" "ENDIF" "ENDDO" "END SELECT"

/Open Brace Strings = "(" "["

/Close Brace Strings = ")" "]"

/Open Fold Strings = "FUNCTION" "MODULE" "PROGRAM" "SUBROUTINE" "THEN" "ELSE" "DO" "SELECT"

/Close Fold Strings = "END FUNCTION" "END MODULE" "END PROGRAM" "END SUBROUTINE" "ELSE" "END IF" "END DO" "END SELECT"

/C1"Statements"

ALLOCATABLE ALLOCATE ASSIGNMENT

BLOCK

CALL CASE CHARACTER COMMON COMPLEX CONTAINS CONTINUE CYCLE

DATA DEALLOCATE DIMENSION DO DOUBLE

ELEMENTAL ELSE ELSEIF ELSEWHERE END ENDDO ENDIF ENTRY EQUIVALENCE EXIT EXTERNAL

FORALL FORMAT FUNCTION

GO GOTO

IF IMPLICIT IN INOUT INQUIRE INTEGER INTENT INTERFACE INTRINSIC

LOGICAL

MODULE

NAMELIST NONE NULLIFY

ONLY OPERATOR OPTIONAL OUT

PARAMETER POINTER PRECISION PRIVATE PROCEDURE PROGRAM PUBLIC PURE

REAL RECURSIVE RESULT RETURN

SAVE SELECT SEQUENCE STOP SUBROUTINE

TARGET THEN TO TYPE

USE

WHERE WHILE

/C2"Intrinsic Operators"

.AND. .EQ. .EQV. .FALSE. .GE. .GT. .LE. .LT. .NE. .NEQV. .NOT. .OR. .TRUE.

/C3"Functions+Subroutines"

ABS ACHAR ACOS ADJUSTL ADJUSTR AIMAG AINT ALL ALLOCATED ANINT ANY ASIN ASSOCIATED ATAN ATAN2

BIT_SIZE BTEST

CARG CEILING CHAR CMPLX CONJG COS COSH COUNT CPU_TIME CSHIFT

DATE_AND_TIME DBLE DIGITS DIM DOT_PRODUCT DPROD

EOSHIFT EPSILON EXP EXPONENT

FLOAT FLOOR FRACTION

HUGE

IACHAR IAND IBCLR IBITS IBSET ICHAR IEOR IFIX INDEX INT IOR ISHFT ISHFTC

KIND

LBOUND LEN LEN_TRIM LGE LGT LLE LLT LOG LOG10 LSHIFT

MATMUL MAX MAXEXPONENT MAXLOC MAXVAL MERGE MIN MINEXPONENT MINLOC MINVAL MOD MODULO MVBITS

NEAREST NINT NOT NULL

PACK PRESENT PRODUCT

RADIX RANDOM_NUMBER RANDOM_SEED RANGE REPEAT RESHAPE

SCALE SCAN SELECTED_INT_KIND SELECTED_REAL_KIND SET_EXPONENT SHAPE SIGN SIN SINH SIZE SPACING SPREAD SQRT

SUM SYSTEM_CLOCK

TAN TANH TINY TRANSFER TRANSPOSE TRIM

UBOUND UNPACK

VERIFY

/C4"I/O statements"

BACKSPACE

CLOSE

ENDFILE

OPEN

PRINT

READ REWIND

WRITE

/C5"File Status"

ACCESS ACTION APOSTROPHE APPEND ASIS

BLANK

DELIM DIRECT

ERR EXIST

FILE FMT FORM FORMATTED FROM

IOSTAT

LOCATION

NAME NAMED NEW NEXTREC NO NUMBER

OLD OPENED

PAD POSITION

QUOTE

READWRITE RECL REPLACE

SCRATCH SEQUENTIAL STAT STATUS

UNFORMATTED UNIT UNKNOWN

YES

ZERO

/C6"Preprocessor"

INCLUDE

/C7"Operators"

*

+

-

// /

<

=

>

/C8"Continue Line"

&

 

 

 

 

然后将其保存为fortran.uew,在UltraEdit界面中选择“”高级“-》”配置“,在”导航“中选择”编辑器显示“中的”语法亮亮“,浏览文档的完整目录,比如D:/Program Files/UltraEdit/wordfiles,选中”启用语法彩色显示“,确定。

重新启动UltraEdit,选择“视图”--“查看方式(高亮文件类型)”--“Fortran 90”,OK!

你可能感兴趣的:(function,Random,fortran,subroutine,preprocessor,fold)