Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: What does the "L" mean Date: Wed, 04 Dec 2019 08:28:23 -0800 Organization: None to speak of Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="53c91e5d7ccd4f979d3bf8716c51ff69"; logging-data="13928"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Zv2vbw7uc690qiYVxhnt8" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:0pju9fUo651pzRAYM7ttCiD9kAk= sha1:iq4MftirvFHgES75SJn1rQ4mNMg= Xref: csiph.com comp.lang.c++:70242 T writes: > MB_ICONEXCLAMATION > 0x00000030L > > What does the "L" at the end mean? The type of a hexadecimal integer literal with an "L" suffix is of the first of long int unsigned long int long long int unsigned long long int in which its value will fit (C++11 2.14.2 [lex.icon]). Since long int is guaranteed to be at least 32 bits, 0x00000030L is of type long int. The leading 0s are presumably intended to imply a 32-bit quantity, which is probably the case for the system for which the code is intended, but it's not guaranteed. (64-bit Linux-based systems usually have 64-bit long; on such systems 0x00000030L is 64 bits. It's *always* of type long int under any conforming implementations.) Leading zeros are ignored. 0x00000000000000000000000000000030L is equivalent to 0x00000030L. A conforming implementation could make long int any size 32 bits or wider. The size in bits is a multiple of CHAR_BIT, which is at least 8. An implementation could have 33-bit long int; on such a system characters would have to be either 11 or 33 bits. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */