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


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

Re: C++ variable names

From Bo Persson <bo@bo-persson.se>
Newsgroups comp.lang.c++
Subject Re: C++ variable names
Date 2020-01-16 08:44 +0100
Message-ID <h8aiiqF5fpiU1@mid.individual.net> (permalink)
References <qvohup$gar$1@dont-email.me> <4d6f2d19-ff6f-433c-bff9-adde1c8b719a@googlegroups.com> <qvoipk$1bd$1@dont-email.me> <nb102f93tq0r8lav6tk8d51cdh9ihu33ik@4ax.com> <qvp1lg$u6u$1@dont-email.me>

Show all headers | View raw


On 2020-01-16 at 07:59, T wrote:
> On 2020-01-15 22:44, Louis Krupp wrote:
>> On Wed, 15 Jan 2020 18:46:12 -0800, T <T@invalid.invalid> wrote:
>>
>>> On 2020-01-15 18:42, Daniel wrote:
>>>> On Wednesday, January 15, 2020 at 9:32:02 PM UTC-5, T wrote:
>>>>> Hi All,
>>>>>
>>>>> Would some kind individual please fill in
>>>>> the C++ variables names that go with these
>>>>> C variable names?
>>>>>
>>>>> int8_t in C
>>>>
>>>> ...
>>>>>
>>>>> Do I just drop the "_t"?
>>>>>
>>>> In general it's considered to be bad practice to adorn a variable name
>>>> with type information.
>>>>
>>>> Daniel
>>>>
>>>
>>>
>>> I am getting this list from:
>>>
>>> https://docs.raku.org/language/nativetypes#Types_with_native_representation_and_size 
>>>
>>>
>>> What do you recommend (I clearly have no idea
>>> what I am doing)?
>>
>> That page seems to have nothing to do with C++ and a lot to do with an
>> implementation of Perl6. Are you really using Perl6?
>>
>> Louis
>>
> 
> Exactly.
> 
> I am writing my own paper on how to use Raku's
> NativeCall with Win API functions.  One of the
> chapters is matching up C and C++ types to Raku
> native types.  To do so, I need their proper names.

If you limit yourself to Windows, this becomes a lot easier as you can 
just look up what the built in types are there - you can use short for 
16 bits, int and unsigned for 32-bits, and long long when you need 64-bits.

The _t-types in the standard libary are for when *you* want to write a 
library for a wide set of systems and you don't know what type is 32 
bits wide (if any).

One (very small) advantage of using int32_t is that it will not compile 
if you happen to try out your code on a 36-bit computer. But that never 
happens anyway if you use Windows.


> 
> I just need the corresponding C++ names for the
> C types shown on that page.
> 
> The reason for the C++ names is because M$ shows their
> functions as C++ calls.
> 
> :-)
> 
> -T
> 

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


Thread

C++ variable names T <T@invalid.invalid> - 2020-01-15 18:31 -0800
  Re: C++ variable names Daniel <danielaparker@gmail.com> - 2020-01-15 18:42 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 18:46 -0800
      Re: C++ variable names Daniel <danielaparker@gmail.com> - 2020-01-15 21:30 -0800
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:52 -0800
      Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-15 23:44 -0700
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 22:59 -0800
          Re: C++ variable names Bo Persson <bo@bo-persson.se> - 2020-01-16 08:44 +0100
            Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:48 -0800
            Re: C++ variable names David Brown <david.brown@hesbynett.no> - 2020-01-16 10:08 +0100
          Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-16 00:43 -0700
            Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:51 -0800
              Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-16 01:39 -0700
                Re: C++ variable names T <T@invalid.invalid> - 2020-01-16 14:01 -0800
    Re: C++ variable names Lynn McGuire <lynnmcguire5@gmail.com> - 2020-01-16 15:48 -0600
      Re: C++ variable names Öö Tiib <ootiib@hot.ee> - 2020-01-16 14:11 -0800
        Re: C++ variable names Lynn McGuire <lynnmcguire5@gmail.com> - 2020-01-17 18:52 -0600
        Re: C++ variable names Manfred <noname@add.invalid> - 2020-01-18 16:22 +0100
          Re: C++ variable names Öö Tiib <ootiib@hot.ee> - 2020-01-18 10:41 -0800
          Re: C++ variable names Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-01-21 05:31 -0800
      Re: C++ variable names David Brown <david.brown@hesbynett.no> - 2020-01-16 23:32 +0100
      Re: C++ variable names legalize+jeeves@mail.xmission.com (Richard) - 2020-01-19 19:13 +0000
  Re: C++ variable names red floyd <no.spam@its.invalid> - 2020-01-15 18:45 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 18:47 -0800
    Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-15 21:51 -0800
      Re: C++ variable names red floyd <no.spam@its.invalid> - 2020-01-15 22:44 -0800
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:00 -0800
  Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 19:40 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 19:58 -0800
      Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 20:12 -0800
    Re: C++ variable names James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-01-15 23:18 -0500
      Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 20:20 -0800
        Re: C++ variable names James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-01-16 12:06 -0800
          Re: C++ variable names T <T@invalid.invalid> - 2020-01-16 14:02 -0800
      Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 20:31 -0800
        Re: C++ variable names David Brown <david.brown@hesbynett.no> - 2020-01-16 11:09 +0100
  Re: C++ variable names Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-01-16 03:52 +0000
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 19:59 -0800
      Re: C++ variable names Bo Persson <bo@bo-persson.se> - 2020-01-16 06:33 +0100
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:53 -0800
  Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 06:18 +0100
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:54 -0800
      Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 06:59 +0100
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 22:31 -0800
          Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-16 00:15 -0800
          Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 11:25 +0100
            Re: C++ variable names Mister2U@honorific.org - 2020-01-16 11:47 +0000
              Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 13:31 +0100
                Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-16 15:51 -0800
                Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-16 15:51 -0800
                Re: C++ variable names Manfred <invalid@add.invalid> - 2020-01-17 01:31 +0100
  Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-15 21:48 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:55 -0800
      Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-16 00:01 -0800
    Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 22:28 -0800
      Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 22:31 -0800
  Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 23:16 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:26 -0800
      Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 23:34 -0800
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:53 -0800
          Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-16 03:04 -0700
  C++ variable names James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-01-16 11:51 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-16 13:58 -0800

csiph-web