📄 ftypes.gml
字号:
.us double precision constant
has one of the following forms.
.autopoint
.point
A simple real constant followed by a
.mono D
followed by an optionally signed
integer constant.
.point
An integer constant followed by a
.mono D
followed by an optionally signed
integer constant.
.endpoint
.np
.ix exponent
The optionally signed integer constant that follows the
.mono D
is called the
.us exponent.
The value of a double precision constant that contains an exponent
is the value of the constant preceding the
.mono D
multiplied by the power of
ten determined by the double precision exponent.
Note that the resulting approximation is of greater precision than
the equivalent real constant.
The approximations may be of equal precision if the approximations
are exact representations.
For example,
.mono 0D0
and
.mono 0E0
are double and single precision constants respectively, both
representing zero with the same precision.
.np
The following are examples of double precision constants.
.millust begin
1423.34D12
+345.D-4
-.4565788D5
2D6
.millust end
.*
.section Complex Constant
.*
.np
.ix constant complex
.ix 'complex constant'
A
.us complex constant
consists of a left parenthesis, followed by a real or integer constant
representing the real part of the complex constant, followed by a
comma, followed by a real or integer constant representing
the imaginary part of the complex constant, followed by a right
parenthesis.
.np
The following are examples of complex constants.
.millust begin
( 1423.34E12, 3 )
( +345, 4 )
.millust end
.*
.section Double Precision Complex Constant (Extension)
.*
.np
.ix constant 'double precision complex'
.ix 'double precision complex constant'
.xt begin
A
.us double precision complex constant
has the same form as a complex constant except that at least one of the
real and imaginary parts
.us must
be a double precision constant.
.xt end
.np
The following are examples of double precision complex constants.
.millust begin
( 1423.34D12, 3 )
( +345, 4D2 )
.millust end
.*
.section Logical Constant
.*
.np
.ix constant logical
.ix 'logical constant'
A
.us logical constant
can have one of the following forms.
.autopoint
.point
.mono .TRUE.
representing the value true.
.point
.mono .FALSE.
representing the value false.
.endpoint
.*
.section Character Constant
.*
.np
.ix constant character
.ix 'character constant'
A
.us character constant
consists of an apostrophe followed by any string of characters
followed by an apostrophe.
The apostrophes are not part of the datum.
If an apostrophe is to appear as part of the datum it must be followed
immediately by another apostrophe.
Note that blanks are significant.
The length of the character constant is the number of characters
appearing between the delimiting apostrophes.
Consecutive apostrophes in a character datum represent one character,
namely the apostrophe.
A character constant must not have length 0.
.np
The following are examples of character constants.
.millust begin
'ABCDEFG1234567'
'There''s always tomorrow'
.millust end
.*
.section String Constant (Extension)
.*
.np
.xt begin
.ix constant string
.ix 'string constant'
A
.us string constant
consists of an apostrophe followed by any string of characters
followed by an apostrophe and then the letter
.mono C
or
.mono c.
The apostrophes are not part of the datum.
The datum is stored in memory with a terminating NUL character
(CHAR(0)).
If an apostrophe is to appear as part of the datum it must be followed
immediately by another apostrophe.
Note that blanks are significant.
The length of the string constant is the number of characters
appearing between the delimiting apostrophes plus one for the
terminating NUL character (CHAR(0)).
Consecutive apostrophes in a string datum represent one character,
namely the apostrophe.
A string constant must not have length 0.
A string constant may be used anywhere a character constant may be used.
.np
The following are examples of string constants.
.millust begin
'Hello there'C
'There''s always tomorrow'c
'The result for %s=%d'c
.millust end
.xt end
.*
.section Hollerith Constants (Extension)
.*
.np
.ix constant hollerith
.ix 'hollerith constant'
.xt begin
A
.us hollerith constant
consists of a positive unsigned integer constant
.id n
followed by the letter
.mono H or
.mono h
followed by a string of exactly
.id n
characters.
The actual data is the
.id n
characters following the letter
.mono H
or
.mono h.
A hollerith constant is another way of representing character data.
.xt end
.keep
.np
.xt begin
Actually, hollerith constants are treated as character constants
and can be used wherever a character constant can be used.
Hollerith constants are different from character constants in that
a quote is represented by two quotes in character constants and by
a single quote in hollerith constants.
.np
The following are examples of hollerith constants.
.millust begin
5HABCDEFG
10h xxxxx '44
.millust end
.pc
.xt end
.*
.section Hexadecimal Constants (Extension)
.*
.np
.ix constant hexadecimal
.ix 'hexadecimal constant'
.xt begin
Two forms of
.us hexadecimal constant
are supported.
The first form can only be used in type declaration or
.kw DATA
statements.
The second form may be used anywhere an integer constant may be used.
.np
The first form of hexadecimal constant consists of the letter
.mono Z
or
.mono z
followed by a string of hexadecimal digits.
A hexadecimal digit can be any digit or one of the letters
.mono A, B, C, D, E
or
.mono F
(the lower case of these letters is also acceptable).
The actual data is the hexadecimal digits following the letter
.mono Z
or
.mono z.
Hexadecimal constants of this form can only be used in type
declaration statements and
.kw DATA
statements for initializing memory with binary patterns.
.np
The following are examples of the first form of hexadecimal constant.
.millust begin
z1234
Zac
.millust end
.pc
The first example is equivalent to the binary pattern
.mono 0001 0010 0011 0100.
The second example is equivalent to the binary pattern
.mono 1010 1100.
.np
The second form of hexadecimal constant consists of an apostrophe
followed by any string of hexadecimal digits followed by an apostrophe
and then the letter
.mono X
or
.mono x.
A hexadecimal digit can be any digit or one of the letters
.mono A, B, C, D, E
or
.mono F
(the lower case of these letters is also acceptable).
The actual data is the hexadecimal digits placed inside apostrophes.
.np
The following are examples of the second form of hexadecimal constant.
.millust begin
'1234'x
'ac'X
.millust end
.pc
The first example is equivalent to the binary pattern
.mono 0001 0010 0011 0100.
The second example is equivalent to the binary pattern
.mono 1010 1100.
.xt end
.*
.section Octal Constants (Extension)
.*
.np
.ix constant octal
.ix 'octal constant'
.xt begin
An
.us octal constant
consists of an apostrophe followed by any string of octal digits
followed by an apostrophe and then the letter
.mono O
or
.mono o.
An octal digit can be any of the digits 0 through 7.
The actual data is the octal digits placed inside apostrophes.
An octal constant may be used anywhere an integer constant may be used.
.xt end
.keep 15
.np
.xt begin
The following are examples of octal constants.
.millust begin
'1234'o
'37'O
.millust end
.pc
The first example is equivalent to the binary pattern
.mono 001 010 011 100.
The second example is equivalent to the binary pattern
.mono 011 111.
.xt end
.endlevel
.*
.section Symbolic Constants
.*
.np
It is possible to give a constant a symbolic name.
This is done through
.kw PARAMETER
statements.
For more details, see the section on the
.kw PARAMETER
statement in the chapter entitled :HDREF refid='fstats'..
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -