Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
6b32f9fc
Commit
6b32f9fc
authored
Mar 28, 2005
by
Steven G. Kargl
Committed by
Steven G. Kargl
Mar 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document AIMAG, AINT, ALL
From-SVN: r97123
parent
7a17ef5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
174 additions
and
8 deletions
+174
-8
gcc/fortran/ChangeLog
+4
-0
gcc/fortran/intrinsic.texi
+170
-8
No files found.
gcc/fortran/ChangeLog
View file @
6b32f9fc
2005-03-27 Steven G. Kargl <kargls@comcast.net>
* intrinsic.texi: Document AIMAG, AINT, ALL
2005-03-26 Steven G. Kargl <kargls@comcast.net>
* arith.c (check_result): Fix illogical logic.
...
...
gcc/fortran/intrinsic.texi
View file @
6b32f9fc
...
...
@@ -39,6 +39,9 @@ and editing. All contributions and corrections are strongly encouraged.
*
@code
{
ACOS
}
:
ACOS
,
Arccosine
function
*
@code
{
ADJUSTL
}
:
ADJUSTL
,
Left
adjust
a
string
*
@code
{
ADJUSTR
}
:
ADJUSTR
,
Right
adjust
a
string
*
@code
{
AIMAG
}
:
AIMAG
,
Imaginary
part
of
complex
number
*
@code
{
AINT
}
:
AINT
,
Truncate
to
a
whole
number
*
@code
{
ALL
}
:
ALL
,
Determine
all
values
are
true
@end
menu
@node
Introduction
...
...
@@ -339,15 +342,174 @@ end program test_adjustr
@end
table
@node
AIMAG
@section
@code
{
AIMAG
}
---
Imaginary
part
of
complex
number
@findex
@code
{
AIMAG
}
intrinsic
@findex
@code
{
DIMAG
}
intrinsic
@cindex
Imaginary
part
@table
@asis
@item
@emph
{
Description
}
:
@code
{
AIMAG
(
Z
)}
yields
the
imaginary
part
of
complex
argument
@code
{
Z
}.
@item
@emph
{
Option
}
:
f95
,
gnu
@item
@emph
{
Type
}
:
elemental
function
@item
@emph
{
Syntax
}
:
@code
{
X
=
AIMAG
(
Z
)}
@item
@emph
{
Arguments
}
:
@multitable
@columnfractions
.
15
.
80
@item
@var
{
Z
}
@tab
The
type
of
the
argument
shall
be
@code
{
COMPLEX
(
*
)}.
@end
multitable
@item
@emph
{
Return
value
}
:
The
return
value
is
of
type
real
with
the
kind
type
parameter
of
the
argument
.
@item
@emph
{
Example
}
:
@smallexample
program
test_aimag
complex
(
4
)
z4
complex
(
8
)
z8
z4
=
cmplx
(
1.e0
_4
,
0.e0
_4
)
z8
=
cmplx
(
0.e0
_8
,
1.e0
_8
)
print
*
,
aimag
(
z4
),
dimag
(
z8
)
end
program
test_aimag
@end
smallexample
@item
@emph
{
Specific
names
}
:
@multitable
@columnfractions
.
24
.
24
.
24
.
24
@item
Name
@tab
Argument
@tab
Return
type
@tab
Option
@item
@code
{
DIMAG
(
Z
)}
@tab
@code
{
COMPLEX
(
8
)
Z
}
@tab
@code
{
REAL
(
8
)}
@tab
f95
,
gnu
@end
multitable
@end
table
@node
AINT
@section
@code
{
AINT
}
---
Imaginary
part
of
complex
number
@findex
@code
{
AINT
}
intrinsic
@findex
@code
{
DINT
}
intrinsic
@cindex
whole
number
@table
@asis
@item
@emph
{
Description
}
:
@code
{
AINT
(
X
[,
KIND
])}
truncates
its
argument
to
a
whole
number
.
@item
@emph
{
Option
}
:
f95
,
gnu
@item
@emph
{
Type
}
:
elemental
function
@item
@emph
{
Syntax
}
:
@code
{
X
=
AINT
(
X
)}
@
*
@code
{
X
=
AINT
(
X
,
KIND
)}
@item
@emph
{
Arguments
}
:
@multitable
@columnfractions
.
15
.
80
@item
@var
{
X
}
@tab
The
type
of
the
argument
shall
be
@code
{
REAL
(
*
)}.
@item
@var
{
KIND
}
@tab
(
Optional
)
@var
{
KIND
}
shall
be
a
scalar
integer
initialization
expression
.
@end
multitable
@item
@emph
{
Return
value
}
:
The
return
value
is
of
type
real
with
the
kind
type
parameter
of
the
argument
if
the
optional
@var
{
KIND
}
is
absence
;
otherwise
,
the
kind
type
parameter
will
be
given
by
@var
{
KIND
}.
If
the
magnitude
of
@var
{
X
}
is
less
than
one
,
then
@code
{
AINT
(
X
)}
returns
zero
.
If
the
magnitude
is
equal
to
or
greater
than
one
,
then
it
returns
the
largest
whole
number
that
does
not
exceed
its
magnitude
.
The
sign
is
the
same
as
the
sign
of
@var
{
X
}.
@item
@emph
{
Example
}
:
@smallexample
program
test_aint
real
(
4
)
x4
real
(
8
)
x8
x4
=
1.234E0
_4
x8
=
4
.
321
_8
print
*
,
aint
(
x4
),
dint
(
x8
)
x8
=
aint
(
x4
,
8
)
end
program
test_aint
@end
smallexample
@item
@emph
{
Specific
names
}
:
@multitable
@columnfractions
.
24
.
24
.
24
.
24
@item
Name
@tab
Argument
@tab
Return
type
@tab
Option
@item
@code
{
DINT
(
X
)}
@tab
@code
{
REAL
(
8
)
X
}
@tab
@code
{
REAL
(
8
)}
@tab
f95
,
gnu
@end
multitable
@end
table
@node
ALL
@section
@code
{
ALL
}
---
All
values
in
@var
{
MASK
}
along
@var
{
DIM
}
are
true
@findex
@code
{
ALL
}
intrinsic
@cindex
true
values
@table
@asis
@item
@emph
{
Description
}
:
@code
{
ALL
(
MASK
[,
DIM
])}
determines
if
all
the
values
are
true
in
@var
{
MASK
}
in
the
array
along
dimension
@var
{
DIM
}.
@item
@emph
{
Option
}
:
f95
,
gnu
@item
@emph
{
Type
}
:
transformational
function
@item
@emph
{
Syntax
}
:
@code
{
L
=
ALL
(
MASK
)}
@
*
@code
{
L
=
ALL
(
MASK
,
DIM
)}
@item
@emph
{
Arguments
}
:
@multitable
@columnfractions
.
15
.
80
@item
@var
{
MASK
}
@tab
The
type
of
the
argument
shall
be
@code
{
LOGICAL
(
*
)}
and
it
shall
not
be
scalar
.
@item
@var
{
DIM
}
@tab
(
Optional
)
@var
{
DIM
}
shall
be
a
scalar
integer
with
a
value
that
lies
between
one
and
the
rank
of
@var
{
MASK
}.
@end
multitable
@item
@emph
{
Return
value
}
:
@code
{
ALL
(
MASK
)}
returns
a
scalar
value
of
type
@code
{
LOGICAL
(
*
)}
where
the
kind
type
parameter
is
the
same
as
the
kind
type
parameter
of
@var
{
MASK
}.
If
@var
{
DIM
}
is
present
,
then
@code
{
ALL
(
MASK
,
DIM
)}
returns
an
array
with
the
rank
of
@var
{
MASK
}
minus
1
.
The
shape
is
determined
from
the
shape
of
@var
{
MASK
}
where
the
@var
{
DIM
}
dimension
is
elided
.
@table
@asis
@item
(
A
)
@code
{
ALL
(
MASK
)}
is
true
if
all
elements
of
@var
{
MASK
}
are
true
.
It
also
is
true
if
@var
{
MASK
}
has
zero
size
;
otherwise
,
it
is
false
.
@item
(
B
)
If
the
rank
of
@var
{
MASK
}
is
one
,
then
@code
{
ALL
(
MASK
,
DIM
)}
is
equivalent
to
@code
{
ALL
(
MASK
)}.
If
the
rank
is
greater
than
one
,
then
@code
{
ALL
(
MASK
,
DIM
)}
is
determined
by
applying
@code
{
ALL
}
to
the
array
sections
.
@end
table
@item
@emph
{
Example
}
:
@smallexample
program
test_all
logical
l
l
=
all
((
/
.
true
.,
.
true
.,
.
true
.
/
))
print
*
,
l
call
section
contains
subroutine
section
integer
a
(
2
,
3
),
b
(
2
,
3
)
a
=
1
b
=
1
b
(
2
,
2
)
=
2
print
*
,
all
(
a
.
eq
.
b
,
1
)
print
*
,
all
(
a
.
eq
.
b
,
2
)
end
subroutine
section
end
program
test_all
@end
smallexample
@end
table
@comment
gen
aimag
@comment
dimag
@comment
@comment
gen
aint
@comment
dint
@comment
@comment
gen
all
@comment
@comment
gen
allocated
@comment
@comment
gen
anint
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment