>> - Bitshift right

Top  Previous  Next

Syntax

<result> := (<longValue> >> <shiftCount> )

Parameters

<longValue>

 

The value to be shifted bitwise right. It must be a LONG.

 

<shiftCount>

 

The number of bits to shift <longValue> right.

Resulting Code

A call shifting <longvalue> right by <shiftCount> bits. The result is another LONG value.

Description

The >> macro is resolved by a call to the BitShiftLeft function passing - <shiftCount> as second parameter. It is provided to facilitate porting of C code. Brackets must be used for the macro as shown.

Classification

Core

Category

Binary Operation Macros

Quick Info

Library: cckptcor.lib / cckptcor.dll

Header: cmacros.ch

See also

BitShiftLeft

Example

 

#INCLUDE "CockpitCoreLibs.ch"

#INCLUDE "cmacros.ch"

 

FUNCTION Main

 

* This will display the value 3

? (12 >> 2)

 

RETURN NIL