Bug 28655 - [F2003] In/output: DECIMAL=/dp/dc; SIGN=/S/SP/SS BLANK=/PAD=; DELIM=; ENCODING=
Summary: [F2003] In/output: DECIMAL=/dp/dc; SIGN=/S/SP/SS BLANK=/PAD=; DELIM=; ENCOD...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 enhancement
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: F2003
  Show dependency treegraph
 
Reported: 2006-08-08 16:43 UTC by tobias.burnus
Modified: 2008-04-08 08:41 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-09-28 08:03:35


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tobias.burnus 2006-08-08 16:43:19 UTC
(should block F2003 meta PR 20585)

gfortran should support:

- DECIMAL= 'COMMA' or 'POINT' specifier in OPEN, READ, WRITE and INQUIRE (9.4.5.5, 9.5.1.6  in F2003 standard)
- DP and DC as edit descriptors (10.7.8)

- SIGN= 'PLUS', 'SUPPRESS' or 'PROCESSOR_DEFINED' specifier for OPEN, WRITE and INQUIRE (9.4.5.14, 9.5.1.13)
- SS, SP and S edit descriptors (10.7.4)

- DELIM= 'APOSTROPHE', 'QUOTE' or 'NONE' also for WRITE  (9.4.5.6, 9.5.1.7)

- BLANK= 'NULL'/'ZERO' and PAD= 'YES'/'NO' specifiers: Now also for READ 
(9.4.5.10, 9.4.5.4; new: 9.5.1.5, 9.5.1.9)

- ENCODING= 'DEFAULT'/'UTF-8' (open); 'UTF-8'/'UNDEFINED'/'UNKNOWN'/... for INQUIRE (9.4.5.7, 9.9.1.9)

---------------------
program iotests
  implicit none
  character(len=45) :: a
  real, parameter :: pi = 3.14159265358979323846
!  write(*,'(f10.3,s,f10.3,sp,f10.3,ss,f10.3)',SIGN='PLUS') pi, pi, pi, pi
!  write(*,'(f10.3,dc,f10.3,dp,f10.3)',DECIMAL='COMMA') pi, pi, pi
!  write(6,*,delim='quote') 'Hello'
  open(99,file='test.dat',form='formatted',status='new')
  write(99,'(a)') 'hello'
  close(99)
  open(99,file="test.dat",form='formatted',status='old', &
       PAD='YES',BLANK='NULL',ENCODING='DEFAULT')
  read(99,*,PAD='NO',BLANK='NULL') a
  close(99)
end program iotests
---------------------

The current diagnostic for 'sp' is strange:
  write(*,'(f10.3,dc,f10.3,f10.3)') pi, pi, pi
                                             1
Warning: Positive width required in format string at (1)
-- and --
Fortran runtime error: Nonnegative width required in format
(f10.3,dc,f10.3,f10.3)
        ^
Comment 1 Tobias Burnus 2008-04-05 22:47:42 UTC
Mostly fixed by the check in for PR 25829.

Missing: Some clean up, INQUIRE, round=, and encoding=.
Comment 2 Jerry DeLisle 2008-04-07 22:29:40 UTC
Now completed.  INQUIRE functions work.  Closing this PR will open seorate PRS for the run time items UTF-8 and ROUNDing modes.
Comment 3 Tobias Burnus 2008-04-08 08:41:16 UTC
(In reply to comment #1)
> Mostly fixed by the check in for PR 25829.
> Missing: Some clean up, INQUIRE, round=, and encoding=.

Follow up: PR 35863, PR 35862