Share via


_CountLeadingOnes

This function returns the number of contiguous one bits starting with the most significant bit.

unsigned __cdecl _CountLeadingOnes(
  long arg1
);

Parameters

  • arg1
    [in] The long integer argument that the function examines to find one bits.

Return Values

The number of contiguous one bits in arg1. If all the bits in arg1 are set, the return value is 32.

Remarks

This function may be implemented by calling a runtime function.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Cmnintrin.h.

See Also

Common Intrinsic Functions

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.