From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8623fab5750cd6aa X-Google-Attributes: gid103376,public Newsgroups: comp.lang.ada Subject: Re: Improving Ada's image - Was: 7E7 Flight Controls Electronics References: <40b9c99e$0$268$edfadb0f@dread16.news.tele.dk> <70Suc.8419$hB2.6364@nwrdny03.gnilink.net> <40bcf1a4$0$317$edfadb0f@dread16.news.tele.dk> From: Stefan Nobis Organization: ESN - EDV-Beratung, Sicherheit, Netzbetreuung Date: Wed, 02 Jun 2004 12:59:32 +0200 Message-ID: <87r7syns2z.fsf@snobis.de> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:rPuKcukX9aj3/L55+QwXgJ/lCRI= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: id4cc059f.versanet.de X-Original-NNTP-Posting-Host: id4cc059f.versanet.de X-Trace: olaf.komtel.net 1086174003 212.204.5.159 (2 Jun 2004 13:00:03 +0200) Path: controlnews3.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!feed.news.tiscali.de!news.belwue.de!news.tu-darmstadt.de!renate.komtel.net!olaf.komtel.net!mauzi.home!news Xref: controlnews3.google.com comp.lang.ada:1018 Date: 2004-06-02T12:59:32+02:00 List-Id: "Per Dalgas Jakobsen" writes: > For C++, templates should be the answer, but unfortunately quite a bit of > "implementation specific freedom" renders this feature "less useful". > http://www.mozilla.org/hacking/portable-cpp.html (a bit old, but still valid > to some extend). No, that's not valid today! The page is dated even before the release of the official ISO Standard for C++ and that's over six years since. Today even MS Visual C++ supports templates quite good. > And just exactly how big is an int? Well, we could define an int16 for a > signed 16 bit integer, int32 ..., etc. But how do you get it into your code: > You include a header-file with sized integer types. > Then another guy wants to use your code, but he has his own header-file with > sized integer types, unfortunately this guy has named his unsigned 8 bit as > uchar8, and you called it uint8. Now what? Things gets very messy, very > fast. There are standard types for this kind of sizing quite a time around now (see stdint.h -- OK, it's ISO C99 but most C++ compilers support this too and there's a cstdint.hpp from boost.org for C++). > Did I miss the point here? No, but your information are a bit outdated in some areas. -- Stefan.