Fortran95附录C FORTRAN95语法Word文档格式.docx
《Fortran95附录C FORTRAN95语法Word文档格式.docx》由会员分享,可在线阅读,更多相关《Fortran95附录C FORTRAN95语法Word文档格式.docx(35页珍藏版)》请在冰豆网上搜索。
FORTRAN95的语法规则(ISO/IEC1559-1:
1997(E))
语法成分
形式描述
编号
access-id
use-name
|generic-spec
523
access-spec
PUBLIC
|PRIVATE
511
access-stmt
access-spec[[:
:
]access-id-list]
522
ac-do-variable
scalar-int-variable
436
ac-implied-do
(ac-value-list,ac-implied-do-control)
434
ac-implied-do-control
ac-do-variable=scalar-int-expr,scalar-int-expr[,scalar-int-expr]
435
action-stmt
allocate-stmt
|assignment-stmt
|backspace-stmt
|call-stmt
|close-stmt
|continue-stmt
|cycle-stmt
|deallocate-stmt
|endfile-stmt
|end-function-stmt
|end-program-stmt
|end-subroutine-stmt
|exit-stmt
|forall-stmt
|goto-stmt
|if-stmt
|inquire-stmt
|nullify-stmt
|open-stmt
|pointer-assignment-stmt
|print-stmt
|read-stmt
|return-stmt
|rewind-stmt
|stop-stmt
|where-stmt
|write-stmt
216
actual-arg
Expr
|variable
|procedure-name
1214
actual-arg-spec
[keyword=]actual-arg
1212
ac-value
|ac-implied-do
433
add-op
+
|-
710
add-operand
[add-operandmult-op]mult-operand
706
allocatable-stmt
ALLOCATABLE[:
]array-name[(deferred-shape-spec-list)]
{,array-name[(deferred-shape-spec-list)]}
527
allocate-lower-bound
scalar-int-expr
627
allocate-object
variable-name
|structure-component
625
allocate-shape-spec
[allocate-lower-bound:
]allocate-upper-bound
626
ALLOCATE(allocation-list[,STAT=stat-variable])
622
allocate-upper-bound
628
allocationallocate-object
[(allocate-shape-spec-list)]
624
alphanumeric-character
Letter
|digit
|underscore
302
and-op
.AND.
720
and-operand
[not-op]level-4-expr
715
array-constructor
(/ac-value-list/)
432
array-element
data-ref
615
array-section
dataref[(substringrange)]
616
array-spec
explicit-shape-spec-list
|assumed-shape-spec-list
|deferred-shape-spec-list
|assumed-size-spec
513
assignment-stmt
variable=expr
735
assumed-shape-spec
[lower-bound]:
517
assumed-shape-spec-list
assumed-shape-spec{assumed-shape-spec}
assumed-size-spec
[explicit-shape-spec-list,][lower-bound:
]*
519
attr-spec
PARAMETER
|access-spec
|ALLOCATABLE
|DIMENSION(array-spec)
|EXTERNAL
|INTENT(intent-spec)
|INTRINSIC
|OPTIONAL
|POINTER
|SAVE
|TARGET
503
backspace-stmt
BACKSPACEexternal-file-unit
|BACKSPACE(position-spec-list)
919
binary-constant
B'
digit{digit}'
|B"
digit{digit}"
408
blank-interp-edit-desc
BN
|BZ
1015
block
{execution-part-construct}
801
block-data
block-data-stmt[specification-part]end-block-data-stmt
1112
block-data-stmt
BLOCKDATA[block-data-name]
1113
block-do-construct
do-stmtdo-blockend-do
817
boz-literal-constant
binary-constant
|octal-constant
|hex-constant
407
call-stmt
CALLsubroutine-name[([actual-arg-spec-list])]
1211
case-construct
select-case-stmt{case-stmtblock}end-select-stmt
808
case-expr
scalar-int-expr
|scalar-char-expr
|scalar-logical-expr
812
case-selector
(case-value-range-list)
|DEFAULT
813
case-stmt
CASEcase-selector[case-construct-name]
810
case-value
scalar-int-initialization-expr
|scalar-char-initialization-expr
|scalar-logical-initialization-expr
815
case-value-range
case-value
|case-value:
|:
case-value
814
case-value-range-list
case-value-range{case-value-range}
char-constant
constant
309
char-expr
expr
726
char-initialization-exr
731
char-length
(char-len-param-value)
|scalar-int-literal-constant
509
char-len-param-value
specification-expr
|*
510
char-literal-constant
[_kind-param]'
{rep-char}'
|[_kind-param]"
{rep-char}"
420
char-selector
length-selector
|(LEN=char-len-param-value,KIND=scalar-int-initialization-expr)
|(char-len-param-value,[KIND=]scalar-int-initialization-expr)
|(KIND=scalar-int-initialization-expr[,LEN=char-len-param-value])
507
char-string-edit-desc
1016
char-variable
variable
605
close-spec
[UNIT=]external-file-unit
|IOSTAT=scalar-default-int-variable
|ERR=label
|STATUS=scalar-default-char-expr
908
close-stmt
CLOSE(close-spec-list)
907
common-block-object
variable-name[(explicit-shape-spec-list)]
530
common-stmt
COMMON[/[common-block-name]/]common-block-object-list
{[,]/[common-block-name]/common-blockobject-list}
549
complex-literal-constant
(real-part,imag-part)
417
component-array-spec
explicit-shape-spec-list
427
component-attr-spec
POINTER
|DIMENSION(component-array-spec)
426
component-attr-spec-list
component-attr-spec{component-attr-spec}
component-decl
component-name[(component-array-spec)][*char-length][component-initialization]
428
component-decl-list
component-decl{component-decl}
component-def-stmt
type-spec[[,component-attr-spec-list]:
]component-decl-list
425
component-initialization
=initialization-expr
|=>
NULL()
429
concat-op
//
712
connect-spec
|FILE=file-name-expr
|ACCESS=scalar-default-char-expr
|FORM=scalar-default-char-expr
|RECL=scalar-int-expr
|BLANK=scalar-default-char-expr
|POSITION=scalar-default-char-expr
|ACTION=scalar-default-char-expr
|DELIM=scalar-default-char-expr
|PAD=scalar-default-char-expr
905
constant
literal-constant
|named-constant
305
constant-subobject
subobject
702
contains-stmt
CONTAINS
1227
continue-stmt
CONTINUE
839
control-edit-desc
position-edit-desc
|[r]/
|sign-edit-desc
|kP
|blank-interp-edit-desc
1010
cycle-stmt
CYCLE[do-construct-name]
834
d
int-literal-constant
1008
data-edit-desc
Iw[.m]
|Bw[.m]
|Ow[.m]
|Zw[.m]
|Fw.d
|Ew.d[Ee]
|ENw.d[Ee]
|ESw.d[Ee]
|Gw.d[Ee]
|Lw
|A[w]
|Dw.d
1005
Data-i-do-object
Array-element
|scalarstructurecomponent
|dataimplieddo
536
Data-i-do-variable
Scalar-int-variable
537
Data-implied-do
(data-i-do-object-list,data-i-do-variable=scalar-int-expr
scalar-int-expr[,scalar-int-expr])
535
part-ref{%part-ref}
612
data-stmt
DATAdata-stmt-set{[,]data-stmt-set}
532
data-stmt-constant
scalar-constant
|scalar-constant-subobject
|signed-int-literal-constant
|signed-real-literal-constant
|NULL()
|structure-constructor
|entry-stmt
540
Data-stmt-object
variable
|data-implied-do
534
data-stmt-object-list
data-stmt-object{data-stmt-object}
datastmtrepeat
Scalar-int-constant
|scalar-int-constant-subobject
539
data-stmt-set
data-stmt-object-list/data-stmt-value-list/
533
Data-stmt-value
[data-stmt-repeat*]data-stmt-constant
538
data-stmt-value-list
data-stmt-value{data-stmt-value}
deallocate-stmt
DEALLOCATE(allocate-object-list[,STAT=stat-variable])
631
declaration-construct
derived-type-def
|interface-block
|type-declaration-stmt
|specification-stmt
|parameter-stmt
|format-stmt
|stmt-function-stmt
207
default-char-expr
727
Default-char-variable
606
default-int-variable
608
default-logical-variable
604
deferred-shape-spec
518
defined-binary-op
.letter{letter}.
724
defined-operator
|defined-unary-op
|extended-intrinsic-op
311
defined-unary-op
704
derived-type-def
derived-type-stmt{private-sequence-stmt}component-def-stmt{component-def-stmt}end-type-stmt
422
derived-type-stmt
TYPE[[,access-spec]]type-name
423
digit-string
digit{digit}
402
dimension-stmt
DIMENSION[:
]array-name(array-spec){,array-name(array-spec)}
526
do-block
823
do-construct
816
do-construct-name
name
do-stmt
label-do-stmt
|nonlabel-do-stmt
818
do-variable
scalar-int-variable
822
dummy-arg
dummy-arg-name
1223
e
1009
else-if-stmt
ELSEIF(scalar-logical-expr)THEN[if-construct-name]
804
else-stmt
ELSE[if-construct-name]
805
elsewhere-stmt
ELSEWHERE[where-construct-name]
745
end-block-data-stmt
END[BLOCKDATA[block-data-name]]
1114
end-do
end-do-stmt
824
end-do-stmt
ENDDO[do-construct-name]
825
endfile-stmt
ENDFILEexternal-file-unit
920
end-forall-stmt
ENDFORALL[forall-construct-name]
753
end-function-stmt
END[FUNCTION[function-name]]
1220
end-if-stmt
ENDIF[if-construct-name]
806
end-interface-stmt
ENDINTERFACE[generic-spec]
1204
end-mod