Re: Intrinsic functions in fortran 90
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Fri, 08 Apr 2005 14:17:39 -0700
Gary L. Scott wrote:
glen herrmannsfeldt wrote:
(snip)
PL/I built in functions know how to convert to a type that exists.
Well, partly it is that PL/I has many more types than Fortran does,
but it will convert in integer to floating point, call a floating point
EXP function, and then convert to the proper type for the LHS. The choice of which EXP to call is, as you say, independent of the LHS.
(PL/I will even convert character data, though that might be beyond the call of duty. EXP('10') will also work.)
A nice feature for an interpreter. I guess I don't mind it, but it seems that it would not likely encourage efficient coding by newbies.
CS people I know claim that most languages that we use are somewhere between pure compiler and pure interpreter. This includes that any subroutine calls not explicitly coded, especially to do I/O, are not
'compiled code'. Maybe more obvious, Fortran FORMATTED I/O has to interpret the format strings, or an intermediate representation of them.
Most interpreted languages are converted to an intermediate form, such as tokenizing keywords, before they are interpreted, a process similar to compilation.
PL/I can, and usually does, do fixed/float conversions inline, though such conversions are often slow. The conversion between character and numeric is done exactly the same as Fortran internal I/O, well, after Fortran got list directed internal I/O, except that it is implied.
Formatted I/O, including list directed I/O, is often pretty slow, and yes, the comparison to an interpreter is fair.
-- glen
.
- Follow-Ups:
- Re: Intrinsic functions in fortran 90
- From: Gordon Sande
- Re: Intrinsic functions in fortran 90
- References:
- Intrinsic functions in fortran 90
- From: student
- Re: Intrinsic functions in fortran 90
- From: Bob Walton
- Re: Intrinsic functions in fortran 90
- From: student
- Re: Intrinsic functions in fortran 90
- From: Gary L. Scott
- Re: Intrinsic functions in fortran 90
- From: student
- Re: Intrinsic functions in fortran 90
- From: Richard Edgar
- Re: Intrinsic functions in fortran 90
- From: glen herrmannsfeldt
- Re: Intrinsic functions in fortran 90
- From: Gary L. Scott
- Intrinsic functions in fortran 90
- Prev by Date: Re: [Solved] Re: getting NaNs from dsaupd_
- Next by Date: Re: Intrinsic functions in fortran 90
- Previous by thread: Re: Intrinsic functions in fortran 90
- Next by thread: Re: Intrinsic functions in fortran 90
- Index(es):
Relevant Pages
|
Loading