TRANSFER(3I) Last changed: 1-6-98
TRANSFER - Treats the first argument as if it is of the same type as
the second argument
TRANSFER ([SOURCE=]source, [MOLD=]mold [,[SIZE=]size])
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The TRANSFER intrinsic function returns a result with the physical
representation identical to that of source but interpreted with the
type and kind of mold. If mold is character, the result has the same
character length declared for mold. It accepts the following
arguments:
source Can be of any type. It can be scalar or array valued.
mold Can be of any type. It can be scalar or array valued. This
intrinsic function should not be used if mold is a derived
type with a pointer component; the result of this depends on
your implementation.
size Must be scalar and an integer.
TRANSFER is a transformational function. The name of this intrinsic
cannot be passed as an argument.
The result has the same type as mold.
If mold is scalar and size is not present, the result is a scalar.
If mold is array valued and size is not present, the result is an
array of rank one. The size of the array is as small as possible such
that its physical representation is not shorter than that of source.
If size is present, the result is an array of rank one with an extent
of size.
If the physical representation of the function result is the same
length as source, the result is the entire representation of source.
If the physical representation of the function result is longer than
source, the result is the entire representation of source and the
remainder of the result is undefined. If the physical representation
of the function result is shorter than source, the result is the
leading part of source. If source and mold are scalar entities and
the size of mold is at least as long as source, the result must be the
value of source. For example, if source is an array and mold is a
rank one array, E is the value of the following:
TRANSFER(TRANSFER(E, D), E, SIZE(E))
Example 1: The result of TRANSFER(4612671180845875200, 0.0) has the
value 4.0 on a CRAY Y-MP M90 system or CRAY Y-MP E system.
Example 2: The result of TRANSFER('abc', 'd') has the value a.
Example 3: Assume that A is the following real array: [1.1, 2.2,
3.3]. The result of TRANSFER(A, (/(0.0,0.0)/)) is a complex
1-dimensional array with one element: (1.1, 2.2).
The result of TRANSFER(A,(/(0.0,0.0)/), 1) is a complex rank one array
with one element (1.1, 2.2).
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
TRANSFER(3I) Last changed: 1-6-98
TRANSFER - Treats the first argument as if it is of the same type as
the second argument
TRANSFER ([SOURCE=]source, [MOLD=]mold [,[SIZE=]size])
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The TRANSFER intrinsic function returns a result with the physical
representation identical to that of source but interpreted with the
type and kind of mold. If mold is character, the result has the same
character length declared for mold. It accepts the following
arguments:
source Can be of any type. It can be scalar or array valued.
mold Can be of any type. It can be scalar or array valued. This
intrinsic function should not be used if mold is a derived
type with a pointer component; the result of this depends on
your implementation.
size Must be scalar and an integer.
TRANSFER is a transformational function. The name of this intrinsic
cannot be passed as an argument.
The result has the same type as mold.
If mold is scalar and size is not present, the result is a scalar.
If mold is array valued and size is not present, the result is an
array of rank one. The size of the array is as small as possible such
that its physical representation is not shorter than that of source.
If size is present, the result is an array of rank one with an extent
of size.
If the physical representation of the function result is the same
length as source, the result is the entire representation of source.
If the physical representation of the function result is longer than
source, the result is the entire representation of source and the
remainder of the result is undefined. If the physical representation
of the function result is shorter than source, the result is the
leading part of source. If source and mold are scalar entities and
the size of mold is at least as long as source, the result must be the
value of source. For example, if source is an array and mold is a
rank one array, E is the value of the following:
TRANSFER(TRANSFER(E, D), E, SIZE(E))
Example 1: The result of TRANSFER(4612671180845875200, 0.0) has the
value 4.0 on a CRAY Y-MP M90 system or CRAY Y-MP E system.
Example 2: The result of TRANSFER('abc', 'd') has the value a.
Example 3: Assume that A is the following real array: [1.1, 2.2,
3.3]. The result of TRANSFER(A, (/(0.0,0.0)/)) is a complex
1-dimensional array with one element: (1.1, 2.2).
The result of TRANSFER(A,(/(0.0,0.0)/), 1) is a complex rank one array
with one element (1.1, 2.2).
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|