|
|
Up |
|
|
  |
Author: SimonGSimonG Date: May 1, 2008 05:24
I'm using g95. With
complex(8) :: z
read(*,*,DECIMAL='POINT') z
I can input complex data with e.g. (2.1,3.2) but I haven't found any
way of doing the same with
read(*,*,DECIMAL='COMMA') z
Has anyone had any success doing this or know what the correct way to
input the data is?
Thanks,
Simon Geard
|
| |
|
| | 6 Comments |
|
  |
Author: Tobias BurnusTobias Burnus Date: May 1, 2008 06:20
On May 1, 2:24 pm, SimonG whiteowl.co.uk> wrote:
> I'm using g95. With
>
> complex(8) :: z
> read(*,*,DECIMAL='POINT') z
>
> I can input complex data with e.g. (2.1,3.2) but I haven't found any
> way of doing the same with
>
> read(*,*,DECIMAL='COMMA') z
>
> Has anyone had any success doing this or know what the correct way to
> input the data is?
Using gfortran and NAG f95, I can use: (2,1; 3,2)
Tobias
|
| |
|
| | no comments |
|
  |
Author: SimonGSimonG Date: May 1, 2008 08:13
On May 1, 2:20 pm, Tobias Burnus wrote:
> On May 1, 2:24 pm, SimonG whiteowl.co.uk> wrote:
>
>> I'm using g95. With
>
>> complex(8) :: z
>> read(*,*,DECIMAL='POINT') z
>
>> I can input complex data with e.g. (2.1,3.2) but I haven't found any
>> way of doing the same with
>
>> read(*,*,DECIMAL='COMMA') z
>
>> Has anyone had any success doing this or know what the correct way to
>> input the data is?
>
> Using gfortran and NAG f95, I can use: (2,1; 3,2)
>
> Tobias
|
| Show full article (0.63Kb) |
| no comments |
|
  |
Author: nospamnospam Date: May 1, 2008 09:03
SimonG whiteowl.co.uk> wrote:
[about decimal='comma']
>> Using gfortran and NAG f95, I can use: (2,1; 3,2)
> Thanks for the suggestion but this causes a runtime error in g95. Does
> the standard specify what it should be?
Yes. As above. Of course, it is an f2003 feature, so I'm not sure
whether g95 completely implements ir or not.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
|
| |
| no comments |
|
  |
Author: SimonGSimonG Date: May 4, 2008 05:53
On 1 May, 17:03, nos...@see.signature (Richard Maine) wrote:
> SimonG whiteowl.co.uk> wrote:
>
> [about decimal='comma']
>
>>> Using gfortran and NAG f95, I can use: (2,1; 3,2)
>> Thanks for the suggestion but this causes a runtime error in g95. Does
>> the standard specify what it should be?
>
> Yes. As above. Of course, it is an f2003 feature, so I'm not sure
> whether g95 completely implements ir or not.
>
> --
> Richard Maine | Good judgement comes from experience;
> email: last name at domain . net | experience comes from bad judgement.
> domain: summertriangle | -- Mark Twain
I reported it as a bug and it has already been fixed! Thanks for you
help.
Simon
|
| |
| no comments |
|
  |
Author: TerenceTerence Date: May 4, 2008 20:55
Several european languages and all of South America write cent values
after a comma, and so continue to do so in mathematics with "decimal
commas". It has always caused problems in reading transcribed data in
scientific and accounting applications.
|
| |
| no comments |
|
  |
|
|
  |
Author: Janne BlomqvistJanne Blomqvist Date: May 4, 2008 23:56
On 2008-05-05, Terence cantv.net> wrote:
> Several european languages and all of South America write cent values
> after a comma, and so continue to do so in mathematics with "decimal
> commas". It has always caused problems in reading transcribed data in
> scientific and accounting applications.
Yes. Hence the DECIMAL='COMMA' in Fortran 2003 (see the thread
title). Although, if one is still stuck in 1977 (i.e. "the past") for
ideological or whatever reasons, that won't help. ;-)
TBH, despite residing in a country that officially uses decimal
commas, I tend to use punctuation marks. And so do a lot of other
people, especially in science/engineering. I suppose mainly due to the
influence of english literature as well as english-centric software.
--
Janne Blomqvist
|
| |
| no comments |
|
|