Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #70334

Re: What does the "L" mean

Subject Re: What does the "L" mean
Newsgroups comp.lang.c++
References <qs7npd$5jn$1@dont-email.me> <qs7o3e$5mt$1@news.albasani.net> <7zMGF.175055$r31.68365@fx18.am4> <qsg823$q9j$1@gioia.aioe.org>
From Bart <bc@freeuk.com>
Message-ID <LCNGF.696078$8yt1.451629@fx12.am4> (permalink)
Organization virginmedia.com
Date 2019-12-07 13:16 +0000

Show all headers | View raw


On 07/12/2019 13:05, boltar@nowhere.co.uk wrote:
> On Sat, 7 Dec 2019 12:04:15 +0000
> Bart <bc@freeuk.com> wrote:
>> On 07/12/2019 11:57, boltar@nowhere.co.uk wrote:
>>> On Fri, 6 Dec 2019 17:50:39 +0000
>>> Bart <bc@freeuk.com> wrote:
>>>> On 06/12/2019 16:30, boltar@nowhere.co.uk wrote:
>>>>> On Fri, 6 Dec 2019 16:20:07 +0000
>>>>> Bart <bc@freeuk.com> wrote:
>>
>>>>>> (Suggestion: don't bother with 'long' at all; either use plain int (32
>>>>>> bits on most relevant machines), or long long int (64 bits), which has
>>>>>> the -LL suffix for constants that need to be considered 64 bits.)
>>>>>
>>>>> #include <stdint.h>
>>>>>
>>>>> int32_t myint;
>>>>> int64_t mylong;
>>
>>>>> Sorted.
>>>>
>>>> You use a library where the author also 'sorted' by using a type 'mylong'.
>>>
>>> stdint.h is an official standard header file and has been for decades.
>>
>> Sorry, I thought from the names used in your examples that you were
>> typedef-ing myint and mylong, rather than declaring instances with those
>> names.
>>
>> In that case, you don't know whether your typedef-ed 'mylong' is going
>> to be defined on top of the same ?intN_t types as someone else's 'mylong'.
>>
> 
> Eh?
> 
> If you want to be sure of the size of an int or long just use the official
> typedefs for 32 and 64 bit types. I don't see what the problem is.
> 
> 

Yeah, /I/ can do that. The problem is not everyone else will do so.

Is int64_t* the same as long*? Sometimes yes, sometimes no, sometimes it 
depends. Is a 1234L constant equivalent to int64_t, or int32_t?

Messy, but I was originally replying to this comment:

[PH:] "As a result, now they [MS] cannot change 'long' to 64-bit because 
they have abused it so much."

As I said, at least on Windows, you know it will be 32-bits.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What does the "L" mean T <T@invalid.invalid> - 2019-12-03 23:38 -0800
  Re: What does the "L" mean Bonita Montero <Bonita.Montero@gmail.com> - 2019-12-04 08:43 +0100
    Re: What does the "L" mean T <T@invalid.invalid> - 2019-12-04 00:05 -0800
      Re: What does the "L" mean Geoff <geoff@invalid.invalid> - 2019-12-04 00:32 -0800
        Re: What does the "L" mean T <T@invalid.invalid> - 2019-12-04 00:33 -0800
        Re: What does the "L" mean Paavo Helde <myfirstname@osa.pri.ee> - 2019-12-04 11:11 +0200
          Re: What does the "L" mean Geoff <geoff@invalid.invalid> - 2019-12-04 01:14 -0800
      Re: What does the "L" mean "Fred. Zwarts" <F.Zwarts@KVI.nl> - 2019-12-04 09:39 +0100
        Re: What does the "L" mean T <T@invalid.invalid> - 2019-12-04 00:51 -0800
      Re: What does the "L" mean Paavo Helde <myfirstname@osa.pri.ee> - 2019-12-04 10:40 +0200
        Re: What does the "L" mean T <T@invalid.invalid> - 2019-12-04 00:56 -0800
          Re: What does the "L" mean Bo Persson <bo@bo-persson.se> - 2019-12-04 10:08 +0100
            Re: What does the "L" mean T <T@invalid.invalid> - 2019-12-04 01:20 -0800
              Re: What does the "L" mean Vir Campestris <vir.campestris@invalid.invalid> - 2019-12-04 21:46 +0000
                Re: What does the "L" mean Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-12-05 01:33 +0000
                Re: What does the "L" mean Vir Campestris <vir.campestris@invalid.invalid> - 2019-12-05 15:15 +0000
                Re: What does the "L" mean Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-12-05 15:31 +0000
                Re: What does the "L" mean Vir Campestris <vir.campestris@invalid.invalid> - 2019-12-06 10:59 +0000
                Re: What does the "L" mean Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-12-07 03:55 +0000
                Re: What does the "L" mean James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-12-06 23:38 -0500
                Re: What does the "L" mean Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-12-06 22:36 -0800
                Re: What does the "L" mean Vir Campestris <vir.campestris@invalid.invalid> - 2019-12-08 21:33 +0000
                Re: What does the "L" mean Bart <bc@freeuk.com> - 2019-12-06 20:44 +0000
                Re: What does the "L" mean Bart <bc@freeuk.com> - 2019-12-06 20:52 +0000
                Re: What does the "L" mean Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-12-06 22:20 -0800
        Re: What does the "L" mean Bart <bc@freeuk.com> - 2019-12-06 16:20 +0000
          Re: What does the "L" mean boltar@nowhere.co.uk - 2019-12-06 16:30 +0000
            Re: What does the "L" mean Bart <bc@freeuk.com> - 2019-12-06 17:50 +0000
              Re: What does the "L" mean scott@slp53.sl.home (Scott Lurndal) - 2019-12-06 18:18 +0000
              Re: What does the "L" mean boltar@nowhere.co.uk - 2019-12-07 11:57 +0000
                Re: What does the "L" mean Bart <bc@freeuk.com> - 2019-12-07 12:04 +0000
                Re: What does the "L" mean boltar@nowhere.co.uk - 2019-12-07 13:05 +0000
                Re: What does the "L" mean Bart <bc@freeuk.com> - 2019-12-07 13:16 +0000
                Re: What does the "L" mean Öö Tiib <ootiib@hot.ee> - 2019-12-07 05:49 -0800
          Re: What does the "L" mean scott@slp53.sl.home (Scott Lurndal) - 2019-12-06 16:36 +0000
      Re: What does the "L" mean Bonita Montero <Bonita.Montero@gmail.com> - 2019-12-04 13:47 +0100
        Re: What does the "L" mean Thiago Adams <thiago.adams@gmail.com> - 2019-12-04 04:57 -0800
        Re: What does the "L" mean "Fred. Zwarts" <F.Zwarts@KVI.nl> - 2019-12-04 14:41 +0100
          Re: What does the "L" mean Bonita Montero <Bonita.Montero@gmail.com> - 2019-12-04 15:06 +0100
        Re: What does the "L" mean James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-12-04 08:55 -0500
    Re: What does the "L" mean T <T@invalid.invalid> - 2019-12-04 00:34 -0800
  Re: What does the "L" mean Keith Thompson <kst-u@mib.org> - 2019-12-04 08:28 -0800
    Re: What does the "L" mean Robert Wessel <robertwessel2@yahoo.com> - 2019-12-05 09:32 -0600
      Re: What does the "L" mean Keith Thompson <kst-u@mib.org> - 2019-12-05 10:03 -0800

csiph-web