Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.misc > #2118
| From | "Rod Pemberton" <dont_use_email@xnothavet.cqm> |
|---|---|
| Newsgroups | comp.lang.misc |
| Subject | Re: 100 Things |
| Date | 2014-05-01 16:08 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <op.xe657plx6zenlw@localhost> (permalink) |
| References | <3SQ7v.155346$AI5.24849@fx32.am4> <ljq5sv$coh$1@dont-email.me> <kY48v.181432$Ey6.180503@fx24.am4> <op.xe5porqb6zenlw@localhost> <fTn8v.204519$q95.52415@fx22.am4> |
On Thu, 01 May 2014 04:26:11 -0400, BartC <bc@freeuk.com> wrote: > "Rod Pemberton" <dont_use_email@xnothavet.cqm> wrote in message > news:op.xe5porqb6zenlw@localhost... >> On Wed, 30 Apr 2014 07:16:19 -0400, BartC <bc@freeuk.com> wrote: >>> [intN_t etc] >> >> How often do you use those? > > It's common to use some of those at some time or other, if not all at > the same time. You've never used CHARBIT Um, I can say I generally never use them, and probably never. I can't say with 100% certainty that I've never, ever used them. I'd need to search my code which I have no desire to do. It's possible I used them long ago or in special, rare situations. Mostly, I use a subset of ANSI C. So, they're not a part of that subset, but sometimes I do use other C features, library calls, and include files, although I use those other things very rarely. > or needed an exact 32-bit signed int? Until recently, I've almost never used signed, unsigned only. I've been working on getting comfortable without 'unsigned' and dropping some of the "unecessary" or "useless" 'unsigned' keywords with simple things like 'int' returns or 'char'. I do have one program that I'm aware of that uses signed. It needed to keep a value which could go positive or negative. That can be done with unsigned, but requires more work. Also, I needed to display the sign, and detecting negative values makes that easier. So, I went ahead and used signed for it. I'm probably used signed decades ago when I was first learning C. Of course, I don't change other people's code to use unsigned. So, I use 'unsigned long' for 32-bits. Fortunately, on x86, the compilers I'm using use 32-bits for it, short 16, char 8. If 'unsigned long' is 64-bits on some/all 64-bit compilers and 'unsigned long long' is 128-bits, that could break some of my code, but probably not. If 'unsigned long long' is 64-bits on most 64-bit compilers, I'm probably good. That would likely mean 'unsigned long' is 32, short 16, char 8, as I prefer. I.e.,each a progressively larger multiple by 2 starting at 8. I generally try to keep to ANSI C, so the C99 'uint' extensions aren't formally available. GCC generally allows but warns. E.g., I sometimes use 'long long' C99 sprintf() format specifiers in ANSI C code (-ansi) with GCC. Other compilers will fail that. Rod Pemberton
Back to comp.lang.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C: 100 Things "BartC" <bc@freeuk.com> - 2014-04-29 17:57 +0100
Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-04-30 07:40 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 12:16 +0100
Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-04-30 13:54 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 14:39 +0100
Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-04-30 20:18 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 22:40 +0100
Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-04-30 22:09 +0000
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 23:36 +0100
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 11:03 +1200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 09:47 +0100
Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-05-01 00:35 +0100
Re: 100 Things Andy Walker <news@cuboid.co.uk> - 2014-05-01 11:03 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 20:16 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 12:44 +0100
Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-05-02 11:11 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-02 13:32 +0100
Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-05-02 16:42 +0100
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-02 17:54 +0100
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 11:01 +1200
Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-30 21:13 -0400
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 09:26 +0100
Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-01 16:08 -0400
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 13:42 +1200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 09:35 +0100
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 21:02 +1200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 10:40 +0100
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 22:06 +1200
Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 11:08 +0200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 11:02 +0100
Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 13:57 +0200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 15:12 +0100
Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 17:18 +0200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 17:04 +0100
Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-05-01 18:30 +0000
Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-01 16:08 -0400
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-02 08:30 +1200
Re: 100 Things George Neuner <gneuner2@comcast.net> - 2014-05-03 01:29 -0400
Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-03 02:37 -0400
Re: 100 Things George Neuner <gneuner2@comcast.net> - 2014-05-03 15:39 -0400
Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-03 17:30 -0400
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-04 20:05 +1200
Re: 100 Things George Neuner <gneuner2@comcast.net> - 2014-05-04 13:28 -0400
Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-05 07:40 +1200
Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 22:00 +0200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 23:24 +0100
Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-02 08:59 +0200
Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-02 09:53 +0100
Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-02 11:22 +0200
Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-05-01 18:26 +0000
Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-01 16:08 -0400
Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-05-02 02:49 +0000
Re: C: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-30 22:08 -0400
Re: C: 100 Things "BartC" <bc@freeuk.com> - 2014-07-25 23:53 +0100
Re: C: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-26 05:38 -0400
Re: C: 100 Things "BartC" <bc@freeuk.com> - 2014-07-26 13:51 +0100
Re: C: 100 Things rick.c.hodgin@gmail.com - 2014-10-25 04:48 -0700
Re: C: 100 Things "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2014-10-25 04:50 -0700
csiph-web