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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c6ca9cbe17b867c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: access & address Date: Sat, 16 Oct 2004 16:25:47 +0200 Organization: AdaCL Message-ID: <3025014.yqGbeSrbak@linux1.krischik.com> References: <1c2f5137.0410140105.66fdb23e@posting.google.com> <1347924.5V7QhTSfdI@linux1.krischik.com> <2t7jm8F1sp752U1@uni-berlin.de> <1982479.VT7X1MC7VE@linux1.krischik.com> <1137756.92Qd5cOqoD@linux1.krischik.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1097937468 03 2240 Ta+RXveO7p9hbZF 041016 14:37:48 X-Complaints-To: usenet-abuse@t-online.de X-ID: ZZA4veZAZeB3gpM3oT3zznQ-RhBQMnvo0ixjABruvNIBMpIsLkWbQX User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:5327 Date: 2004-10-16T16:25:47+02:00 List-Id: Xenos wrote: > > "Martin Krischik" wrote in message > news:1137756.92Qd5cOqoD@linux1.krischik.com... >> Born out of experience. Prehaps I have just seen to much code where the >> result of sizeof or std::string::lenght was stored in an int or long or >> whatever else is just available. The returnvalue for both is size_t. > Actually no, the type of std::string::length() is std::string::size_type > which may or may not be std::size_t. I know that. > Although, there is nothing > necessarily > wrong with putting the value in int or long. It comes down to knowing > your > data. Currently I enjoy patching together the libraries of two different vendors. Both of which have a C interface. That puts a real new twist to "knowing your data". And only when PC-lint runs I know when the two interfaces won't fit together. > int is guaranteed to hold a value of at least 65535. I thought int must only be signed 16bit - and that goes only to 32767. While size_t need to be large enough to hold any size. Hence it is unsigned. And on one of my machines it is actually 64 bit. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com