Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Thu, 29 Mar 2007 00:32:23 -0800
Brooks Moses wrote:
glen herrmannsfeldt wrote:
Steven G. Kargl wrote:
There are no negative integers in gfortran. There is a unary
minus operator and whole numbers. :)
(snip)Traditionally DATA statements were maybe the only place where
signed constants were allowed. In F2003:
We've had this conversation before, I think. I distinctly remember that Richard Maine told me I was splitting the standard's hairs far too fine when I suggested that this meant that an integer equal to -HUGE(I)-1 ought to be allowable in DATA statements even though it's an overflow elsewhere. :)
I don't believe that the standard can allow it, as it still
allows digit complement and sign magnitude representations
(as does C).
Before that post I looked to see if OS/360 Fortran allowed it as
an extension, but I didn't see it.
Regardless, yeah -- otherwise something like -23 would be an expression, which isn't allowed in DATA statement.
(snip)
Personally, I think it will make more sense once we have a BITS datatype, because a lot of this actually starts having some sort of coherency if one thinks of it as conversions between different datatypes.
Yes, PL/I does it with the bit string data type, and UNSPEC function
and pseudo-variable.
UNSPEC(r)='10000000000000000000000000000000'B;
> Otherwise, if a BOZ-literal has no type, one starts
describing it as having a context-dependent meaning, and that's completely alien to Fortran and thus fits quite poorly into the rest of the language.
You mean like character data before the CHARACTER type was added?
-- glen
.
- References:
- BOZ literal constants, a puzzle for us Standard-loving types.
- From: Toon Moene
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Steven G. Kargl
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Steven G. Kargl
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Steven G. Kargl
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Brooks Moses
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Steven G. Kargl
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Brooks Moses
- BOZ literal constants, a puzzle for us Standard-loving types.
- Prev by Date: Re: BOZ literal constants, a puzzle for us Standard-loving types.
- Next by Date: copy and move files
- Previous by thread: Re: BOZ literal constants, a puzzle for us Standard-loving types.
- Next by thread: Re: BOZ literal constants, a puzzle for us Standard-loving types.
- Index(es):
Relevant Pages
|
|