|
|
Up |
|
|
  |
Author: dpbdpb Date: Jun 11, 2008 16:06
J. F. Cornwall wrote:
> Hi all. I am fairly sure about the cause of a bug in some old code I'm
> reworking, but thought I would confirm here.
>
> I have a chunk of code (dating from the early 1980's) that accepts
> inputs from users with a
>
> READ (*,'(A)') DBUFF
>
> statement (where DBUFF is CHARACTER*800). The goal is to allow the user
> to type in a nice long descriptive comment, to be stored in the database
> with the associated numbers. However, I cannot get the program to
> correctly read the text from DBUFF if it exceeds 255 characters in
> length. I as assuming that this is because of the RECL for the standard
> input unit number from which I am reading.
..
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?
|
| Show full article (0.85Kb) |
|
| | 7 Comments |
|
  |
Author: dpbdpb Date: Jun 11, 2008 16:18
dpb wrote:
> J. F. Cornwall wrote:
>> Hi all. I am fairly sure about the cause of a bug in some old code
>> I'm reworking, but thought I would confirm here.
>>
>> I have a chunk of code (dating from the early 1980's) that accepts
>> inputs from users with a
>>
>> READ (*,'(A)') DBUFF
>>
>> statement (where DBUFF is CHARACTER*800). The goal is to allow the
>> user to type in a nice long descriptive comment, to be stored in the
>> database with the associated numbers. However, I cannot get the
>> program to correctly read the text from DBUFF if it exceeds 255
>> characters in length. I as assuming that this is because of the RECL
>> for the standard input unit number from which I am reading.
> ..
>
> 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 ...
|
| Show full article (0.94Kb) |
|
| | no comments |
|
  |
Author: glen herrmannsfeldtglen herrmannsfeldt Date: Jun 11, 2008 18:24
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?
It seems that for Fortran 2003, UNIT=INPUT_UNIT (with the appropriate
module) is allowed, but I don't see anything for *.
-- glen
|
| |
| no comments |
|
  |
Author: dpbdpb Date: Jun 11, 2008 20:10
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?
>
> It seems that for Fortran 2003, UNIT=INPUT_UNIT (with the appropriate
> module) is allowed, but I don't see anything for *.
Not absolutely sure...CVF documentation kinda implies but I didn't have
time to actually try it then...
|
| Show full article (0.59Kb) |
| no comments |
|
  |
Author: John HarperJohn Harper Date: Jun 11, 2008 21:04
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 *.
|
| Show full article (1.03Kb) |
| no comments |
|
  |
Author: J. F. CornwallJ. F. Cornwall Date: Jun 12, 2008 07:55
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, ...
|
| Show full article (1.36Kb) |
| no comments |
|
  |
Author: J. F. CornwallJ. F. Cornwall Date: Jun 12, 2008 08:12
dpb wrote:
> dpb wrote:
>
>> J. F. Cornwall wrote:
>>
>>> Hi all. I am fairly sure about the cause of a bug in some old code
>>> I'm reworking, but thought I would confirm here.
>>>
>>> I have a chunk of code...
|
| Show full article (1.44Kb) |
| no comments |
|
  |
|
|
  |
Author: dpbdpb 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) ...
|
| Show full article (1.80Kb) |
| no comments |
|
|