Velocity Reviews > Data types

# Data types

Samuel Thomas
Guest
Posts: n/a

 07-25-2003
Hello everybody,

Could somebody help me with the basic data types we have. I am always
getting confused. Can I write the datatypes in ascending order like
this?

char --> int --> short --> long

float --> double

Are there any other relations? Could somebody tell me more about the
size of these data types?

Sorry for asking such a stupid qn

Thanks for all the help
Sam

Derk Gwen
Guest
Posts: n/a

 07-25-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Samuel Thomas) wrote:
# Hello everybody,
#
# Could somebody help me with the basic data types we have. I am always
# getting confused. Can I write the datatypes in ascending order like
# this?
#
# char --> int --> short --> long
#
# float --> double
#
# Are there any other relations? Could somebody tell me more about the
# size of these data types?

In 1989 there were three possible semilatticess

long double: double, float, long unsigned, long int, unsigned, int
double: float, long unsigned, long int, unsigned, int
float: long unsigned, long int, unsigned, int
long unsigned: long int, unsigned, int

long int: unsigned, int
unsigned: int
OR
unsigned: int, long int
long int: unsigned, int
OR
long int: int
unsigned: int

int: (short int, short unsigned, char, signed char, unsigned char)

--
Derk Gwen http://derkgwen.250free.com/html/index.html
Where do you get those wonderful toys?

Keith Thompson
Guest
Posts: n/a

 07-25-2003
Martien Verbruggen <(E-Mail Removed)> writes:
> On 24 Jul 2003 22:16:33 -0700,
> Samuel Thomas <(E-Mail Removed)> wrote:

[...]
> > float --> double

>
> and long double for C99.

long double is defined in C90. (In many implementations, double and
long double have the same representation.)

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"