Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does L represent in "<any hex number>L"

Tags:

c++

hex

I am looking through some c++ code and I came across this:

if( (size & 0x03L) != 0 )
    throw MalformedBundleException( "bundle size must be multiple of four" );

what does L stand for after the hexadecimal value ?

how does it alter the value 0x03 ?

like image 400
nass Avatar asked Apr 06 '14 10:04

nass


1 Answers

It means Long, as in, the type of the literal 0x03L is long instead of the default int. On some platforms that will mean 64 bits instead of 32 bits, but that's entirely platform-dependent (the only guarantee is that long is not shorter than int).

like image 200
John Zwinck Avatar answered Nov 02 '22 22:11

John Zwinck