home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Programmer'…arterly (Limited Edition)
/
Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso
/
code
/
ch21code
/
integer.cls
< prev
next >
Wrap
Text File
|
1995-08-14
|
670b
|
35 lines
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "clsInteger"
Attribute VB_Creatable = True
Attribute VB_Exposed = True
' clsInteger class -- INTEGER.CLS
' Parses Integers (words) into bytes.
'
' Properties:
' Value
'
' Methods:
' LoByte
' HiByte
'
Option Explicit
' Value property.
Public Value
' HiByte method.
Public Function HiByte()
' Return the high byte from an integer.
HiByte = (Me.Value And &HFF00) \ &H100
End Function
' LoByte method.
Public Function LoByte()
' Return the high byte from an integer.
LoByte = Me.Value Xor (Me.Value And &HFF00)
End Function