Re: Another PL/I cant
From: David Frank (dave_frank_at_hotmail.com)
Date: 08/29/04
- Next message: Frederick Shorts: "Re: GETARG in ifc"
- Previous message: David Frank: "Re: Another PL/I cant"
- In reply to: James Giles: "Re: Another PL/I cant"
- Next in thread: James Giles: "Re: Another PL/I cant"
- Reply: James Giles: "Re: Another PL/I cant"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Frederick Shorts: "Re: GETARG in ifc"
- Previous message: David Frank: "Re: Another PL/I cant"
- In reply to: James Giles: "Re: Another PL/I cant"
- Next in thread: James Giles: "Re: Another PL/I cant"
- Reply: James Giles: "Re: Another PL/I cant"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|