DECIMAL='comma' do not work !? 
Author Message
 DECIMAL='comma' do not work !?

Hi,

I wanted to use the DECIMAL='comma' F2003-feature of g95 but it do
not work as expected:

PROGRAM dec_com
     REAL :: a
     READ(*,*, DECIMAL='comma') a
     WRITE(*,*,DECIMAL='comma') a
     WRITE(*,*) a
END PROGRAM dec_com

==> I got:

12,23
  12.
  12.

Is there a bug or did I something wrong? (Before I contact Andy)

Best regards,

Hani



Fri, 28 Nov 2008 06:44:42 GMT  
 DECIMAL='comma' do not work !?

Quote:
> I wanted to use the DECIMAL='comma' F2003-feature of g95 but it do

Note: F2003 is not f95 (= g95).

Regards,

Mike Metcalf



Fri, 28 Nov 2008 09:09:56 GMT  
 DECIMAL='comma' do not work !?

Quote:

>>I wanted to use the DECIMAL='comma' F2003-feature of g95 but it do

> Note: F2003 is not f95 (= g95).

> Regards,

> Mike Metcalf

But g95 does accept DECIMAL="comma" and it doesn't
appear to do what it is supposed to do, at first glance.

--

The fortran Company
6025 N. Wilmot Rd., Tucson, AZ 85750 USA



Fri, 28 Nov 2008 11:05:23 GMT  
 DECIMAL='comma' do not work !?

Quote:

>> I wanted to use the DECIMAL='comma' F2003-feature of g95 but it do

>Note: F2003 is not f95 (= g95).

True, but DECIMAL='comma' in READ, WRITE and OPEN statements is one of
the f2003 features that the g95 manual says is supported, so I think
the OP has a valid point to raise with Andy. Michael is right if one
is compiling with the g95 -std=f95 option, which correctly objects,
and points out that the tag 'DECIMAL' is an F2003 feature.  

BTW, Sun f95 also implements DECIMAL='comma' and the program works as
expected. If one uses the -ansi option, the program still compiles
and runs, though there is a compile-time message that it is using an
extension to the standard.

-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington, New Zealand



Fri, 28 Nov 2008 11:34:08 GMT  
 DECIMAL='comma' do not work !?
John Harper schrieb:

Quote:


>>> I wanted to use the DECIMAL='comma' F2003-feature of g95 but it do
>> Note: F2003 is not f95 (= g95).

> True, but DECIMAL='comma' in READ, WRITE and OPEN statements is one of
> the f2003 features that the g95 manual says is supported, so I think
> the OP has a valid point to raise with Andy. Michael is right if one
> is compiling with the g95 -std=f95 option, which correctly objects,
> and points out that the tag 'DECIMAL' is an F2003 feature.  

Thank you Michael, Walt and John. As it seems DECIMAL='comma' do not
work properly. I will contact Andy.

Regards,

Hani



Fri, 28 Nov 2008 16:09:13 GMT  
 DECIMAL='comma' do not work !?

Quote:

> Hi,

> I wanted to use the DECIMAL='comma' F2003-feature of g95 but it do
> not work as expected:

> PROGRAM dec_com
>      REAL :: a
>      READ(*,*, DECIMAL='comma') a
>      WRITE(*,*,DECIMAL='comma') a
>      WRITE(*,*) a
> END PROGRAM dec_com

> ==> I got:

> 12,23
>   12.
>   12.

> Is there a bug or did I something wrong? (Before I contact Andy)

   I've got this fixed now, along with another problem discovered by
John Harper with the DC and DP format descriptors.

        Thanks,
            Andy



Sat, 29 Nov 2008 00:58:32 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Reading complex data with DECIMAL='COMMA'

2. 'import' not working

3. I'm not doing a good job

4. Relevance of lists (Was: I'm not doing a good job)

5. getting fields NOT comma delimited with commas inside

6. errors when doing 'make test'

7. Have you ever done 'namespace delete ::'?

8. Page length doesn't work - RESOLVED (if not solved)

9. ' key not working in O4W revisted

10. IN, OUT and certain INT's not working in WinNT/Win2k

11. Gnat 3.10p (.rpm version) + Redhat 5.2 = Not working (I'm new to this)

12. 'size works for SunAda but not GNAT

 

 
Powered by phpBB® Forum Software