PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Two Integers in a Long
When dealing with some windows external function calls a long is sometimes used to return two integer values. This is a programming trick to save 4 bytes of memory when storing 2 integers.

You can use the IntLow() and IntHigh() functions to extract the high and low integer from the long.

Example:

Long ll_2Ints
Integer li_one, li_two

someexternalfunction( ll_2Ints )
li_one = IntHigh( ll_2Ints )
li_two = IntLow( ll_2Ints )
 

Top of Page

Legal Notice

Ken Howe 2011