[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New LONGREAL modules



>  Date: Wed, 10 Jan 96 12:28:43 EST
>  From: Mike Griebling <grieblm@trt.allied.com>
>  Are you saying the string to LONGREAL utility should accept both E
>  and D?

No, I'd prefer just E as exponent marker.

>   
>  > The compiler expects LongStr to accept only the exponent marker E and
>  > changes the exponent accordingly before passing a scanned in number to
>  > LongStr.
>  
>  I don't understand what the compiler has to do with this question?
Its only the language Oberon-2 that introduces the exponent D to allow
the compiler to switch the internal type on real constants.  That
means that D is only introduced for the compilers sake.  

I don't think that D for an exponent is widely used out there.  When a
program prompts you for a real number you don't want to know onto
which type, REAL or LONGREAL, it is mapped...

>  I'm
>  thinking more about the user point of view where the compiler requires
>  LONGREALs with D exponents.  Would it be more consistent to the user to
>  also require LONGREAL strings to have D exponents?
>  
Here users means probably people running programs written in Oberon-2,
but the user has no contact whatsoever with the language itself.  And
he certainly doesn't want to be bothered with language quirks.

>  I am thinking that maybe to accept both would be better.  That way
>  there won't be any surprises.  No matter what the exponent letter,
>  LongStr always converts to LONGREALs.
>  
Suit yourself.  But I don't see any reason for this.

Michael van Acken