Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #24993
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: XC8 novice question |
| Date | 2016-09-11 13:36 +0200 |
| Message-ID | <e3ku00F2ulaU1@mid.dfncis.de> (permalink) |
| References | <wbGdnWYUU7sHnEjKnZ2dnUU7-KvNnZ2d@westnet.com.au> <nr39lt$dr5$1@dont-email.me> <akdatb130h95brnf1ks49svim7oiss97s9@4ax.com> |
Am 11.09.2016 um 12:56 schrieb upsidedown@downunder.com:
> On Sun, 11 Sep 2016 02:55:23 -0700, Don Y
> <blockedofcourse@foo.invalid> wrote:
> Are there still some idiotic systems that are defining char as
> _signed_ ????
Given that such systems are explicitly allowed by the C standard,
there's nothing particularly idiotic about them.
But are there still idiotic programmers who use plain "char" in
situations where they care about signedness? Well, yes, there are.
Which is why coding standards such as MISRA forbid using plain char.
> If we really have to use such outdated systems, why aren't we using 6
> bit characters with all upper case (or all lower case) ? In fact why
> not use 5 bit Baudot as in Manchester computers ?
For starters: because those _are_ forbidden under the rules of the language.
Anyway, making plain char unsigned does not really solve any problem, so
IMHO it's by no means idiotic to keep it signed.
It may appear to provide a solution to the issue: "How to keep non-ASCII
characters in a plain char?" Except that it does so very incompletely,
at best, because there are way more non-ASCII characters than an 8 bits
unsigned char can possibly hold.
If one designed a new language like C today, 'char' would probably be
called 'byte', or it would be emitted in favour of {u,}int8_t, whereas
char would be 16 or 32 bits wide, and character and string constants
UTF-8. But that's 20/20 hind sight, 30 years after the fact.
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
XC8 novice question rwood <rwoodl@nowhere.com> - 2016-09-11 15:02 +0800
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-11 02:55 -0700
Re: XC8 novice question rwood <rwoodl@nowhere.com> - 2016-09-11 18:25 +0800
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-11 13:35 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-11 07:32 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-11 16:58 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-11 13:15 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 08:55 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-12 02:41 -0700
Re: XC8 novice question Mike Perkins <spam@spam.com> - 2016-09-12 13:16 +0100
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 14:56 +0200
Re: XC8 novice question Mike Perkins <spam@spam.com> - 2016-09-12 14:33 +0100
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 16:11 +0200
Re: XC8 novice question Jack <jack4747@gmail.com> - 2016-09-12 07:50 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 22:23 +0200
Re: XC8 novice question Les Cargill <lcargill99@comcast.com> - 2016-09-12 15:34 -0500
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-12 08:44 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 14:35 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-12 08:19 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 23:11 +0200
Re: XC8 novice question Dennis <dennis@none.none> - 2016-09-12 17:04 -0500
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-12 22:49 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-13 09:04 +0200
Re: XC8 novice question Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2016-09-13 00:16 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-12 21:22 -0700
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-13 12:25 +0200
Re: XC8 novice question Dennis <dennis@none.none> - 2016-09-13 10:22 -0500
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-13 20:08 +0200
Re: XC8 novice question rwood <rwoodl@nowhere.com> - 2016-09-12 16:50 +0800
Re: XC8 novice question Tom Gardner <spamjunk@blueyonder.co.uk> - 2016-09-11 17:13 +0100
Re: XC8 novice question Tom Gardner <spamjunk@blueyonder.co.uk> - 2016-09-11 17:19 +0100
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 09:00 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-11 07:28 -0700
Re: XC8 novice question upsidedown@downunder.com - 2016-09-11 13:56 +0300
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-11 13:28 +0200
Re: XC8 novice question Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2016-09-11 13:36 +0200
Re: XC8 novice question upsidedown@downunder.com - 2016-09-11 16:14 +0300
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-11 07:57 -0700
Re: XC8 novice question Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2016-09-12 22:52 +0200
Re: XC8 novice question upsidedown@downunder.com - 2016-09-13 10:11 +0300
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-13 01:11 -0700
Re: XC8 novice question upsidedown@downunder.com - 2016-09-13 13:24 +0300
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-13 12:39 +0200
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-13 15:41 -0700
Re: XC8 novice question upsidedown@downunder.com - 2016-09-14 09:07 +0300
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-13 23:29 -0700
Re: XC8 novice question Don Y <blockedofcourse@foo.invalid> - 2016-09-11 07:50 -0700
Re: XC8 novice question Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2016-09-11 13:42 +0200
Re: XC8 novice question Tim Wescott <tim@seemywebsite.com> - 2016-09-11 20:14 -0500
Re: XC8 novice question rwood <rwoodl@nowhere.com> - 2016-09-12 16:54 +0800
Re: XC8 novice question David Brown <david.brown@hesbynett.no> - 2016-09-12 11:05 +0200
Re: XC8 novice question rwood <rwoodl@nowhere.com> - 2016-09-12 18:48 +0800
Re: XC8 novice question John Temples <usenet@xargs-spam.com> - 2016-09-12 17:33 +0000
csiph-web