Re: Sun Studio 12, 'standard input' RECL question...
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Sun Studio 12, 'standard input' RECL question...         

Group: comp.lang.fortran · Group Profile
Author: dpb
Date: Jun 12, 2008 10:45

J. F. Cornwall wrote:
> John Harper wrote:
>> In article aioe.org>, dpb non.net> wrote:
>>
>>> glen herrmannsfeldt wrote:
>>>
>>>> dpb wrote:
>>>>
>>>>
>>>>> J. F. Cornwall wrote:
>>>>
>>>> (snip)
>>>>
>>>>
>>>>>> READ (*,'(A)') DBUFF
>>>>
>>>> (snip)
>>>>
>>>>
>>>>> I don't know about Sun Studio and someone (Bob Corbett may see)
>>>>> surely does. However, as a quickie, what does INQUIRE() for RECL
>>>>> tell you, if anything?
>>>>
>>>> Is UNIT=* allowed for INQUIRE?
>>
>>
>> No, presumably because INQUIRE wouldn't know whether you were asking
>> about the input or output unit called *.
>>
>> The good news is that Sun Studio 12 f95 has implemented
>> iso_fortran_env so you can discover the unsurprising fact that
>> input_unit is 5.
>> The bad news is that INQUIRE with that unit gives recl == 0, and when
>> I tried to read a long string of characters with (A) format it was OK
>> up to length 256 but not at 257.
>
> I haven't had a chance to try putting an INQUIRE into the program (spent
> last night in the basement watching tornadoes on local weather
> radar...), but your experiment sounds like confirmation of the same
> limit. We still do everything in fixed-format "F77" (yes, I know it's
> really the f95 compiler). It would appear my best short-term option is
> to tell the users they get 255 characters for a comment in this
> particular application :-\

I had chance to actually 'spearmint -- w/ CVF unit 5 is also the
preconnected input unit. INQUIRE returns 132 and OPEN w/ RECL= returns
IOSTAT == 0, but has no effect--INQUIRE still returns 132 subsequently.

So, no dice on at least one other compiler as well (not that you had any
choice) but an even shorter limit it appears (unless there's some other
workaround)...

--
no comments
diggit! del.icio.us! reddit!