Re: The linf project (2)



analyst41@xxxxxxxxxxx wrote:
On Jun 11, 8:12 am, Gary Scott <garylsc...@xxxxxxxxxxxxx> wrote:

analys...@xxxxxxxxxxx wrote:

On Jun 10, 9:29 pm, "James Giles" <jamesgi...@xxxxxxxxxxxxxxxx> wrote:

analys...@xxxxxxxxxxx wrote:

...

Logical or Bit or Boolean (all synonymous) (1)

It's your language. I wouldn't necessarily have a fixed
size associated with Logical. And I wouldn't have three
names for a single data type. Different names for the
same size data, but which have different semantics for
the different type names is alright (IEEE single float vs.
32-bit integer). But why three names for the same
type?

Logical will be separated from integer: Here are the revised specs
for integer only:

There will be 7 integer primitives with the number of bits
used to store each primitive shown in parentheses:

Bit (1) always unsigned

Tiny Integer (8) always unsigned

Small Integer (16) always unsigned

Integer (32)

Unsigned Integer (32)

Double Integer (64)

Unsigned Double Integer (64)

What about the ability to specify range limits, MSBs/LSBs, etc?



please put some meat on your rather cryptic remark.

An Ada example (possibly does more or less than I think it does)

type My_Int is range 10_000 .. 10_001;

But, I believe that you can specify the maximum/minimum values acceptable. I assume that implies error handling features as well, if not, it should. I'd prefer to specify the meaning of the LSB or scale factor in addition to the min/max range. I don't want this to impact the efficiency of native types necessarily, I just want to be able to define a type with these features.


I forgot to add that all the standard bit operations will be permitted
on all the integer types. Does that help in any way with what you
would like to see?



arithmetic within each type will be the usual arithmetic modulo 2^the
number of bits in the type.

Mixed arithmetic amongst these integer types will be defined later.

--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford- Hide quoted text -

- Show quoted text -




--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows it can't be done.

-- Henry Ford
.



Relevant Pages

  • Re: The linf project (2)
    ... names for a single data type. ... There will be 7 integer primitives with the number of bits ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: The linf project (2)
    ... names for a single data type. ... but which have different semantics for ... Support the Original G95 Project:  http://www.g95.org ... Support the GNU GFortran Project:  http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: Fortran 2003 - official
    ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ... Liberty is a well armed sheep contesting the vote. ...
    (comp.lang.fortran)
  • CLASS Terminology
    ... if "CLASS" defines a type that can change during program execution, why does the term "CLASS" best describe this condition? ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: Help needed
    ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ... God only knows. ...
    (comp.lang.fortran)