Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Signed & unsigned types

Reply
Thread Tools

Signed & unsigned types

 
 
Jack Klein
Guest
Posts: n/a
 
      12-06-2007
On Wed, 05 Dec 2007 10:31:46 +0000, Mark Bluemel
<> wrote in comp.lang.c:

> Ido Yehieli wrote:
> > Hi,
> > from what i've read (http://tigcc.ticalc.org/doc/
> > keywords.html#short) and unsigned int should normally be in the range
> > 0 to 65535. However, compiling and running this program:
> >
> > #include <stdio.h>
> >
> > int main(){
> > unsigned int y=1;
> > y-=2;
> > printf("y=%i\n",y);

>
> What does the %i mask in printf() expect?


I don't know, what do you mean by mask?

> What mask should you specify for unsigned data?


Again, what mask? Most people associate the term "mask" with a
pattern, hopefully of an unsigned integer type, used in bitwise
operations.

The C standard uses the term "conversion specifier". It's ever so
much better than mask, don't you think?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
 
Reply With Quote
 
 
 
 
Mark Bluemel
Guest
Posts: n/a
 
      12-06-2007
Jack Klein wrote:
> On Wed, 05 Dec 2007 10:31:46 +0000, Mark Bluemel
> <> wrote in comp.lang.c:
>
>> Ido Yehieli wrote:


>>> printf("y=%i\n",y);

>> What does the %i mask in printf() expect?

>
> I don't know, what do you mean by mask?

[snip]
> The C standard uses the term "conversion specifier". It's ever so
> much better than mask, don't you think?
>

OK point taken...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(int) -> (unsigned) -> (int) or (unsigned) -> (int) -> (unsigned):I'll loose something? pozz C Programming 12 03-20-2011 11:32 PM
Re: Working with unsigned/signed types Ben Finney Python 11 12-24-2006 05:31 PM
Re: Working with unsigned/signed types Python 1 12-20-2006 08:54 AM
Working with unsigned/signed types Python 0 12-20-2006 05:36 AM
Casting between signed/unsigned pointer types. Jason Heyes C++ 2 02-14-2005 08:03 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57