HIWORD - Extract the unsigned high order word from a long value

Top  Previous  Next

Syntax

<wordResult> := HIWORD( <longValue> )

Parameters

<longValue>

 

The LONG value to extract the high order WORD from.

Resulting Code

A call to BitShiftMaskSign using the proper parameters to retrieve the high order word from <longValue>.

Description

HIWORD retrieves the high order WORD from the LONG <longValue>. The extracted value is unsigned. If you want to extract a signed SHORT value, use HISHORT.

Classification

Core

Category

Value analysis macros

Quick Info

Library: cckptcor.lib / cckptcor.dll

Header: windef.ch

See also

LOWORD, HISHORT

Example

 

#INCLUDE "CockpitCoreLibs.ch"

#INCLUDE "windef.ch"

 

FUNCTION Main

 

* This will display the value 12345

? HIWORD( 12345*65536 + 54321 )

 

RETURN NIL