Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: Distingui**...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 15 Topic 8159 of 8775
Post > Topic >>

Re: Distingui****ng between characters and numbers

by Gordon Sande <g.sande@[EMAIL PROTECTED] > Apr 22, 2008 at 02:20 PM

On 2008-04-22 09:36:41 -0300, Gary Scott <garylscott@[EMAIL PROTECTED]
> said:

> Gordon Sande wrote:
> 
>> On 2008-04-22 07:09:19 -0300, SimonG <simon@[EMAIL PROTECTED]
> said:
>> 
>>> On Apr 22, 10:12 am, "FX" <coud...@[EMAIL PROTECTED]
> wrote:
>>> 
>>>>> I expected the Intel result but perhaps the standard is ambiguous on
>>>>> this. Is this a g95 bug?
>>>> 
>>>> 
>>>> I'd have the same expectation that you have, so I guess there's a
>>>> bugre****t to make (or at least feature request, as lots of other
>>>> compilers behave the other way).
>>>> 
>>>>> A second question: how do I enter a '/' character?
>>>> 
>>>> 
>>>> Well, you have a .co.uk address, so the '/' key should be on the left
of
>>>> your right ****ft key ;-)
>>>> 
>>>> Hum, more seriously, you need to change your read's into:
>>>> 
>>>> read(5,'(a)') buff
>>>> read(buff,'(f20.0)',err=900) x
>>>> 
>>>> (Oh, and doing that fixes the issue with g95, apparently.)
>>>> 
>>>> -- 
>>>> FX
>>> 
>>> 
>>> Yes, making that change does alter the behaviour - the g95 version
>>> works as required but the Intel version now interprets '+' as a number
>>> (as well as '.', ',' and '-'): is that an Intel bug?
>> 
>> 
>> Extensions! Treating "+","-" and "." as short forms of zero is a fairly
>> common extension for numerical input routines. The rationalization is
that
>> the missing digits are being treated as zero. Sometimes it leads to
foolish
>> things like repeated signs being treated as an extra zero. The "," is
likely
>> to be treated as a terminator and results in a missing field of zero.
These
>> extensions appear to be clever (where clever is actually a swear word
when
>> describing software!) but can quickly become very tiring when they
result
>> in obscure lingering wounds to the feet.
>> 
>> Such extensions are surely baggage that Digital/Compaq/Intel has picked
up
>> over time.
> 
> Or invented...
> 
> <snip>

Having seen these clever extensions in other settings I would be more
inclined 
to believe they were user requests. Or at least a request by sales when a
new 
sale got hung up on the absense of the extension during the 
demonstration phase.

Much easier if the customer can re****t zero glitches rather than having to
fix some number of their own past clevernesses.
 




 15 Posts in Topic:
Distinguishing between characters and numbers
SimonG <simon@[EMAIL P  2008-04-22 01:53:23 
Re: Distinguishing between characters and numbers
Arjen Markus <arjen.ma  2008-04-22 02:06:39 
Re: Distinguishing between characters and numbers
fj <francois.jacq@[EMA  2008-04-22 02:07:06 
Re: Distinguishing between characters and numbers
"FX" <couder  2008-04-22 09:12:57 
Re: Distinguishing between characters and numbers
"FX" <couder  2008-04-22 09:12:57 
Re: Distinguishing between characters and numbers
SimonG <simon@[EMAIL P  2008-04-22 03:09:19 
Re: Distinguishing between characters and numbers
Gordon Sande <g.sande@  2008-04-22 12:22:53 
Re: Distinguishing between characters and numbers
Gary Scott <garylscott  2008-04-22 07:36:41 
Re: Distinguishing between characters and numbers
Gordon Sande <g.sande@  2008-04-22 14:20:51 
Re: Distinguishing between characters and numbers
glen herrmannsfeldt <g  2008-04-22 10:38:37 
Re: Distinguishing between characters and numbers
Dick Hendrickson <dick  2008-04-22 12:42:17 
Re: Distinguishing between characters and numbers
nospam@[EMAIL PROTECTED]   2008-04-22 08:38:07 
Re: Distinguishing between characters and numbers
glen herrmannsfeldt <g  2008-04-22 08:33:04 
Re: Distinguishing between characters and numbers
Dick Hendrickson <dick  2008-04-23 00:26:24 
Re: Distinguishing between characters and numbers
SimonG <simon@[EMAIL P  2008-04-22 06:18:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 8:38:22 CDT 2008.