Re: Another PL/I cant

From: David Frank (dave_frank_at_hotmail.com)
Date: 08/28/04

  • Next message: robin: "Re: Another Fortran can't"
    Date: Sat, 28 Aug 2004 07:13:53 GMT
    
    

    "jan van oosterwijk" <jvo_36@hotmail.com> wrote in message
    news:8bb02cd6.0408271157.20faf97d@posting.google.com...
    > "David Frank" <dave_frank@hotmail.com> wrote in message
    > news:<uZlWc.51492$wM.42598@twister.tampabay.rr.com>...
    >> "Mark Yudkin" <myudkinATcompuserveDOTcom@nospam.org> wrote in message
    >> news:cgc170$pee$1@ngspool-d02.news.aol.com...
    >> >
    >> > Robin already posted a solution that was approximately 100 times faster
    >> >
    > [ .. ]
    > If you want to prove anything at all.. at least stick to standard Fortran.
    >

    [ .. ] becomes standard Fortran any time now, (almost certainly this
    year)

    >> Statement 1 using a READ takes 1.8 sec when 2,3 are commented out
    >> Statement 2 using a FORALL takes 0.5 sec when 1,3 are "
    >> Statement 3 using a TRANSFER takes 2.1 sec when 1,2 are "
    >
    >> program hex_to_string ! benchmarking
    >> character(48) :: hex = '414D51204D5153443120202020202020CE361F4120007711'
    >> character(24) :: string
    >> integer :: digit(48:70) = [0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,0, &
    >> 10,11,12,13,14,15]
    > ! Standard is (/ ... /)

    [ .. ] becomes standard Fortran any time now, but use (/ .. /) if your
    compiler
    doesnt have this F2003 syntax now. My CVF compiler does and its MANY
    advanced
    features allows me to rub noses (like yours?) in their stupid compiler
    choices
    (like Salford) quite regularly.

    >> integer :: t1(8), t2(8)
    >>
    >> call date_and_time( values = t1)
    >> do n = 1,100000
    >>
    >> ! Statement 1
    >> read (hex,'(<len(string)>z2)') (string(i:i),i=1,len(string))
    >
    > ! 1. Non standard format < .. >

    One of the VAX extensions that predates the current standard by many years
    and is supported by leading compilers, but not by a compiler choice made by
    ignorant Fortran losers.

    BUT for those whose Fortran compiler doesnt have this support, statement 1
    can be rewritten with no meaningful loss of operation.

          read (hex,'(999Z2)') (string(i:i),i=1,len(string))

    > ! 2. Z format only for integers
    >
    > [JvO]
    >

    Z format can be used to format integer,real,character variables.


  • Next message: robin: "Re: Another Fortran can't"

    Relevant Pages

    • Re: A question on Newtons Method
      ... >> I can't believe you'd advise a noob to use a compiler which is still ... > production codes and codes from textbooks. ... > The Fortran standard generally does not specify the required behavior ... >> another important class of hassle which most numerical programmers ...
      (sci.math.num-analysis)
    • Fortran Resources (July 2004)
      ... and the standard for the Fortran language and its derivatives. ... WHERE CAN I OBTAIN A FORTRAN 95 COMPILER? ... Absoft Fortran compilers, debuggers, and development tools for Windows, ... are available for Linux systems. ...
      (comp.lang.fortran)
    • Fortran Resources (August 2004)
      ... and the standard for the Fortran language and its derivatives. ... Absoft Fortran compilers, debuggers, and development tools for Windows, ... and Linux include source-compatible Fortran 95 compiler suites ... are available for Linux systems. ...
      (comp.lang.fortran)
    • Fortran Resources (Last Issue)
      ... the, then, new Fortran 90. ... and the standard for the Fortran language and its derivatives. ... WHERE CAN I OBTAIN A FORTRAN 95 COMPILER? ... The Fortran Company offers F, the subset language, for Unix and Windows, ...
      (comp.lang.fortran)
    • Fortran Resources (June)
      ... and the standard for the Fortran language and its derivatives. ... WHERE CAN I OBTAIN A FORTRAN 95 COMPILER? ... Absoft Fortran compilers, debuggers, and development tools for Windows, ... are available for Linux systems. ...
      (comp.lang.fortran)