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

Re: New LONGREAL modules



> >  Date: Tue, 9 Jan 96 10:50:05 EST
> >  From: Mike Griebling <grieblm@trt.allied.com>
> >  
> >  I have one question: when converting LONGREAL strings should the number
> >  use a "E" or "D" exponent?  Currently, the LongStr module expects "D"
> >  exponents while the RealStr expects "E"s.  This is contrary to the ISO
> >  standard but more in keeping with Oberon-2 conventions.  All numbers are
> >  converted to strings with the "E" exponent.
> >  
> Since the LongStr module operates solely on LONGREAL values and always
> gives LONGREAL values, I don't see any need to distinguish on the
> string conversion level between E and D.  Or to accept both notations. 

Are you saying the string to LONGREAL utility should accept both E and D?
 
> 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?  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?

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.

> -- Michael

Michael G.