Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Data types (http://www.velocityreviews.com/forums/t314383-data-types.html)

Samuel Thomas 07-25-2003 05:16 AM

Data types
 
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 07-25-2003 04:02 PM

Re: Data types
 
samuel@avenir.net (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 07-25-2003 09:22 PM

Re: Data types
 
Martien Verbruggen <mgjv@tradingpost.com.au> writes:
> On 24 Jul 2003 22:16:33 -0700,
> Samuel Thomas <samuel@avenir.net> 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) kst@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"


All times are GMT. The time now is 10:30 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.