& - Binary And

Top  Previous  Next

Syntax

<result> := (<longValue1> & <longValue2> [ & <longValue3..n> ])

Parameters

<longValue1..n>

 

The values given must be LONGs.

Resulting Code

A call combining all <longValues> with a binary AND operation. The result is another LONG value.

Description

The & macro is resolved by a call to the BitAnd function. It is provided to facilitate porting of C code. To prevent ambiguities with the native Xbase++ & macro-operator, brackets must be put around all values to be combined with the AND operation.

Classification

Core

Category

Binary operation macros

Quick Info

Library: cckptcor.lib / cckptcor.dll

Header: cmacros.ch

See also

BitAnd

Example

 

#INCLUDE "CockpitCoreLibs.ch"

#INCLUDE "cmacros.ch"

 

FUNCTION Main

 

* This will display the value 6

? (15 & 7 & 22)

 

RETURN NIL