Re: Intrinsic functions in fortran 90



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

.



Relevant Pages

  • Re: Does PL/I support dynamic function outputs?
    ... I am certain that if a paying IBM customer asked him the question ... ... "Can programming language A "exactly duplicate" the code in Programming Language ... I am certain that when you purchase a currently supported version of PL/I (any ... > On several occasions you have replied saying you were Fortran rusty, ...
    (comp.lang.pl1)
  • RE: SSP in PL/I or Fortran
    ... >>Subroutine Package that used to exist in both PL/I and Fortran. ... > I have the manual for the FORTRAN SSP and it might be 2 volumes. ... Not to be a party pooper, but please remember that most of these manuals ...
    (bit.listserv.ibm-main)
  • Re: despair
    ... COBOL or PL/I programmers. ... PL/I and C programs for equivalent functionality, you will find that the C version ... As well as Pascal for most of them, Fortran for most of them even COBOL ...
    (comp.os.vms)
  • Re: PL/I will rule the world ... not
    ... FORTRAN would be non-existant as a commercial programming ... They were obviously wrong about COBOL and probably wrong about ... I lost access to a PL/I compiler in 1986, ... lifted from PL/I and plopped down n REXX. ...
    (bit.listserv.ibm-main)
  • Re: COMPILER PERFORMANCE
    ... Fortran to S/360 PL/I. ... All FORTRAN storage was STATIC. ... Single subscript operations were faster than matrix subscript ...
    (comp.lang.pl1)

Loading