Re: Another PL/I cant

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


Date: Sun, 29 Aug 2004 13:29:18 GMT


"James Giles" <jamesgiles@worldnet.att.net> wrote in message
news:JW5Yc.527184$Gx4.87521@bgtnsc04-news.ops.worldnet.att.net...
> David Frank wrote:
> ...
>>>> 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.
>
> I did have a standard conforming way to write something like
> that, but CVF now fails to compile it:
>
> read (hex, '('//len(string)//'x2)') ...
>
> I overloaded the // operator so that when used mixed mode with
> integer expressions and character expressions, it generates an
> character form of the integer value and concatenates that. It's
> superior to the non-standard VAX extension in several ways,
> most importantly it works everywhere, not just in I/O statements.
>
> But, CVF fails to compile it. CVF is a defunct product. HP accepts
> bug reports on it, but I don't think they fix any. Intel has all the
> CVF support staff, but I don't think they fix CVF bugs any more
> either.
>
> In any case, the VAX extention does not (I hope) predate any
> standard feature. It's too limited in where you can use it and
> has some very peculiar end-cases. Something more general
> is preferable (like my oveload of //, which is already standard
> if CVF only complied).
>
> --
> J. Giles
>
>

I'm not going to beat the dead horse issue of why F2003 doesnt have dynamic
formats
despite desire expressed by comp.lang.fortran readers to adopting <..>
syntax
as Lahey, CVF, Intel,?? compilers have done. But will note that you always
chime
in as a group of ONE in opposition when its being discussed.

re: CVF not accepting your format
It accepts my inline formatting below which ought to portable.

read (hex,'('//slen2s(string)//'z2)') (string(i:i),i=1,len(string))

! ------------------------------------
function slen2s(s) result (out)
character(*),intent(in) :: s
character(4) :: out
write (out,'(i4.4)') len(s)
end function
end program



Relevant Pages

  • Re: Another PL/I cant
    ... > One of the VAX extensions that predates the current standard by many years ... I did have a standard conforming way to write something like ... CVF fails to compile it. ...
    (comp.lang.fortran)
  • Re: Why pgf90 can not recognize some intrinsic function when compiling?
    ... Here below is some part of the codes: ... Not all Fortran compilers implement all of the more obscure extensions supported by CVF. ... it would appear that the ways supported under the standard, for the last 25 years, should be preferred to an older extension supported by only a few compilers. ...
    (comp.lang.fortran)
  • Re: Cant understand this! (Help required please)
    ... Yes and some online courses NETG does not seem to understand what ... > New to programming: ... I have heard of comeau don't they make compilers too? ... An argument I have used many times myself, I want to learn standard C++, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: GCC
    ... The header names changed explicitly to ... The Standard says that the standard ... that did not put iostream into the std namespace. ... and compilers change along with them. ...
    (Debian-User)
  • Re: subroutine stack and C machine model
    ... Herb has found out that a+bis ... Peter: But the STANDARD says... ... Most compilers have left to right evaluation as it happens. ... evidence appear to be more than one piece of evidence. ...
    (comp.lang.c)