- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How does Intel Fortran Compiler for Linux (8.1) treat a code-line
with FLOAT? I can't find anything in the manual concerning this.
(Ex: A = FLOAT(B) )
Pablo
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you try looking up FLOAT in the index? FLOAT is an intrinsic function which is treated the same as REAL without a second argument. The statement A=FLOAT(B) converts B to type "default real" (usually REAL(4)) and then assigns the value to A following the rules of intrinsic assignment.
I am not sure what you mean by "manual entry".
I am not sure what you mean by "manual entry".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's interesting, but it's written up under REAL, as it has been in the Fortran standards for many years. It's standard Fortran, even though it has fallen into disuse, and is not mentioned in certain textbooks (e.g. Metcalf, Reid, Cohen). It produces a default real result. There is apparently also an extension for complex, where it produces a real of the same kind as the complex, which seems a particularly inadvisable usage in the case of complex of non-default kind.
Message Edited by tim18 on 05-02-200606:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick reply.
It is as I thought. I was only somewhat concerned because I couldn't
find FLOAT when searching in the Intel Fortran Language Reference manual.
(Found only DFLOAT and QFLOAT)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Tim says, it is found under the description of REAL (and also in the table of specific function names). It is also listed in the Intel Fortran Language Reference index: "FLOAT function, 9-131".
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page