⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intdoc.texi

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@end ifset@ifset familyF77@node CExp Intrinsic@subsubsection CExp Intrinsic@cindex CExp intrinsic@cindex intrinsics, CExp@noindent@exampleCExp(@var{X})@end example@noindentCExp: @code{COMPLEX(KIND=1)} function.@noindent@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:Archaic form of @code{EXP()} that is specificto one type for @var{X}.@xref{Exp Intrinsic}.@node Char Intrinsic@subsubsection Char Intrinsic@cindex Char intrinsic@cindex intrinsics, Char@noindent@exampleChar(@var{I})@end example@noindentChar: @code{CHARACTER*1} function.@noindent@var{I}: @code{INTEGER}; scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:Returns the character corresponding to thecode specified by @var{I}, using the system'snative character set.Because the system's native character set is used,the correspondence between character and their codesis not necessarily the same between GNU Fortranimplementations.Note that no intrinsic exists to convert a numericalvalue to a printable character string.For example, there is no intrinsic that, givenan @code{INTEGER} or @code{REAL} argument with thevalue @samp{154}, returns the @code{CHARACTER}result @samp{'154'}.Instead, you can use internal-file I/O to do this kindof conversion.For example:@smallexampleINTEGER VALUECHARACTER*10 STRINGVALUE = 154WRITE (STRING, '(I10)'), VALUEPRINT *, STRINGEND@end smallexampleThe above program, when run, prints:@smallexample        154@end smallexample@xref{IChar Intrinsic}, for the inverse of the @code{CHAR} function.@xref{AChar Intrinsic}, for the function correspondingto the ASCII character set.@end ifset@ifset familyF2U@node ChDir Intrinsic (subroutine)@subsubsection ChDir Intrinsic (subroutine)@cindex ChDir intrinsic@cindex intrinsics, ChDir@noindent@exampleCALL ChDir(@var{Dir}, @var{Status})@end example@noindent@var{Dir}: @code{CHARACTER}; scalar; INTENT(IN).@noindent@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT).@noindentIntrinsic groups: @code{unix}.@noindentDescription:Sets the current working directory to be @var{Dir}.If the @var{Status} argument is supplied, it contains 0on success or a non-zero error code otherwise upon return.See @code{chdir(3)}.@emph{Caution:} Using this routine during I/O to a unit connected with anon-absolute file name can cause subsequent I/O on such a unit to failbecause the I/O library might reopen files by name.Some non-GNU implementations of Fortran provide this intrinsic asonly a function, not as a subroutine, or do not support the(optional) @var{Status} argument.For information on other intrinsics with the same name:@xref{ChDir Intrinsic (function)}.@end ifset@ifset familyBADU77@node ChDir Intrinsic (function)@subsubsection ChDir Intrinsic (function)@cindex ChDir intrinsic@cindex intrinsics, ChDir@noindent@exampleChDir(@var{Dir})@end example@noindentChDir: @code{INTEGER(KIND=1)} function.@noindent@var{Dir}: @code{CHARACTER}; scalar; INTENT(IN).@noindentIntrinsic groups: @code{badu77}.@noindentDescription:Sets the current working directory to be @var{Dir}.Returns 0 on success or a non-zero error code.See @code{chdir(3)}.@emph{Caution:} Using this routine during I/O to a unit connected with anon-absolute file name can cause subsequent I/O on such a unit to failbecause the I/O library might reopen files by name.Due to the side effects performed by this intrinsic, the functionform is not recommended.For information on other intrinsics with the same name:@xref{ChDir Intrinsic (subroutine)}.@end ifset@ifset familyF2U@node ChMod Intrinsic (subroutine)@subsubsection ChMod Intrinsic (subroutine)@cindex ChMod intrinsic@cindex intrinsics, ChMod@noindent@exampleCALL ChMod(@var{Name}, @var{Mode}, @var{Status})@end example@noindent@var{Name}: @code{CHARACTER}; scalar; INTENT(IN).@noindent@var{Mode}: @code{CHARACTER}; scalar; INTENT(IN).@noindent@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT).@noindentIntrinsic groups: @code{unix}.@noindentDescription:Changes the access mode of file @var{Name} according to thespecification @var{Mode}, which is given in the format of@code{chmod(1)}.A null character (@samp{CHAR(0)}) marks the end ofthe name in @var{Name}---otherwise,trailing blanks in @var{Name} are ignored.Currently, @var{Name} must not contain the single quotecharacter.If the @var{Status} argument is supplied, it contains0 on success or a non-zero error code upon return.Note that this currently worksby actually invoking @code{/bin/chmod} (or the @code{chmod} found whenthe library was configured) and so might fail in some circumstances andwill, anyway, be slow.Some non-GNU implementations of Fortran provide this intrinsic asonly a function, not as a subroutine, or do not support the(optional) @var{Status} argument.For information on other intrinsics with the same name:@xref{ChMod Intrinsic (function)}.@end ifset@ifset familyBADU77@node ChMod Intrinsic (function)@subsubsection ChMod Intrinsic (function)@cindex ChMod intrinsic@cindex intrinsics, ChMod@noindent@exampleChMod(@var{Name}, @var{Mode})@end example@noindentChMod: @code{INTEGER(KIND=1)} function.@noindent@var{Name}: @code{CHARACTER}; scalar; INTENT(IN).@noindent@var{Mode}: @code{CHARACTER}; scalar; INTENT(IN).@noindentIntrinsic groups: @code{badu77}.@noindentDescription:Changes the access mode of file @var{Name} according to thespecification @var{Mode}, which is given in the format of@code{chmod(1)}.A null character (@samp{CHAR(0)}) marks the end ofthe name in @var{Name}---otherwise,trailing blanks in @var{Name} are ignored.Currently, @var{Name} must not contain the single quotecharacter.Returns 0 on success or a non-zero error code otherwise.Note that this currently worksby actually invoking @code{/bin/chmod} (or the @code{chmod} found whenthe library was configured) and so might fail in some circumstances andwill, anyway, be slow.Due to the side effects performed by this intrinsic, the functionform is not recommended.For information on other intrinsics with the same name:@xref{ChMod Intrinsic (subroutine)}.@end ifset@ifset familyF77@node CLog Intrinsic@subsubsection CLog Intrinsic@cindex CLog intrinsic@cindex intrinsics, CLog@noindent@exampleCLog(@var{X})@end example@noindentCLog: @code{COMPLEX(KIND=1)} function.@noindent@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:Archaic form of @code{LOG()} that is specificto one type for @var{X}.@xref{Log Intrinsic}.@node Cmplx Intrinsic@subsubsection Cmplx Intrinsic@cindex Cmplx intrinsic@cindex intrinsics, Cmplx@noindent@exampleCmplx(@var{X}, @var{Y})@end example@noindentCmplx: @code{COMPLEX(KIND=1)} function.@noindent@var{X}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN).@noindent@var{Y}: @code{INTEGER} or @code{REAL}; OPTIONAL (must be omitted if @var{X} is @code{COMPLEX}); scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:If @var{X} is not type @code{COMPLEX},constructs a value of type @code{COMPLEX(KIND=1)} from thereal and imaginary values specified by @var{X} and@var{Y}, respectively.If @var{Y} is omitted, @samp{0.} is assumed.If @var{X} is type @code{COMPLEX},converts it to type @code{COMPLEX(KIND=1)}.@xref{Complex Intrinsic}, for information on easily constructinga @code{COMPLEX} value of arbitrary precision from @code{REAL}arguments.@end ifset@ifset familyGNU@node Complex Intrinsic@subsubsection Complex Intrinsic@cindex Complex intrinsic@cindex intrinsics, Complex@noindent@exampleComplex(@var{Real}, @var{Imag})@end example@noindentComplex: @code{COMPLEX} function, the exact type being the result of cross-promoting thetypes of all the arguments.@noindent@var{Real}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN).@noindent@var{Imag}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN).@noindentIntrinsic groups: @code{gnu}.@noindentDescription:Returns a @code{COMPLEX} value that has @samp{Real} and @samp{Imag} as itsreal and imaginary parts, respectively.If @var{Real} and @var{Imag} are the same type, and that type is not@code{INTEGER}, no data conversion is performed, and the type ofthe resulting value has the same kind value as the typesof @var{Real} and @var{Imag}.If @var{Real} and @var{Imag} are not the same type, the usual type-promotionrules are applied to both, converting either or both to theappropriate @code{REAL} type.The type of the resulting value has the same kind value as thetype to which both @var{Real} and @var{Imag} were converted, in this case.If @var{Real} and @var{Imag} are both @code{INTEGER}, they are both convertedto @code{REAL(KIND=1)}, and the result of the @code{COMPLEX()}invocation is type @code{COMPLEX(KIND=1)}.@emph{Note:} The way to do this in standard Fortran 90is too hairy to describe here, but it is important tonote that @samp{CMPLX(D1,D2)} returns a @code{COMPLEX(KIND=1)}result even if @samp{D1} and @samp{D2} are type @code{REAL(KIND=2)}.Hence the availability of @code{COMPLEX()} in GNU Fortran.@end ifset@ifset familyF77@node Conjg Intrinsic@subsubsection Conjg Intrinsic@cindex Conjg intrinsic@cindex intrinsics, Conjg@noindent@exampleConjg(@var{Z})@end example@noindentConjg: @code{COMPLEX} function, the @samp{KIND=} value of the type being that of argument @var{Z}.@noindent@var{Z}: @code{COMPLEX}; scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:Returns the complex conjugate:@exampleCOMPLEX(REALPART(@var{Z}), -IMAGPART(@var{Z}))@end example@node Cos Intrinsic@subsubsection Cos Intrinsic@cindex Cos intrinsic@cindex intrinsics, Cos@noindent@exampleCos(@var{X})@end example@noindentCos: @code{REAL} or @code{COMPLEX} function, the exact type being that of argument @var{X}.@noindent@var{X}: @code{REAL} or @code{COMPLEX}; scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:Returns the cosine of @var{X}, an angle measuredin radians.@xref{ACos Intrinsic}, for the inverse of this function.@end ifset@ifset familyVXT@node CosD Intrinsic@subsubsection CosD Intrinsic@cindex CosD intrinsic@cindex intrinsics, CosDThis intrinsic is not yet implemented.The name is, however, reserved as an intrinsic.Use @samp{EXTERNAL CosD} to use this name for anexternal procedure.@end ifset@ifset familyF77@node CosH Intrinsic@subsubsection CosH Intrinsic@cindex CosH intrinsic@cindex intrinsics, CosH@noindent@exampleCosH(@var{X})@end example@noindentCosH: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}.@noindent@var{X}: @code{REAL}; scalar; INTENT(IN).@noindentIntrinsic groups: (standard FORTRAN 77).@noindentDescription:Returns the hyperbolic cosine of @var{X}.@end ifset@ifset familyF90@node Count Intrinsic@subsubsection Count Intrinsic@cindex Count intrinsic@cindex intrinsics, CountThis intrinsic is not yet implemented.The name is, however, reserved as an intrinsic.Use @samp{EXTERNAL Count} to use this name for anexternal procedure.@node CPU_Time Intrinsic@subsubsection CPU_Time Intrinsic@cindex CPU_Time intrinsic@cindex intrinsics, CPU_Time@noindent@exampleCALL CPU_Time(@var{Seconds})@end example@noindent@var{Seconds}: @code{REAL}; scalar; INTENT(OUT).@noindentIntrinsic groups: @code{f90}.@noindentDescription:Returns in @var{Seconds} the current value of the system time.This implementation of the Fortran 95 intrinsic is just an alias for@code{second} @xref{Second Intrinsic (subroutine)}.@cindex wraparound, timings@cindex limits, timingsOn some systems, the underlying timings are representedusing types with sufficiently small limits that overflows(wraparounds) are possible, such as 32-bit types.Therefore, the values returned by this intrinsicmight be, or become, negative,or numerically less than previous values,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -