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 / main.bas < prev    next >
BASIC Source File  |  1995-08-14  |  728b  |  28 lines

  1. Attribute VB_Name = "Module1"
  2. Option Explicit
  3.     ' Create an object variable.
  4. Dim lngValue As New clsLong
  5.  
  6. Sub Main()
  7.     #Const DebugBuild = 0
  8.     ' Test code for debugging.
  9.     #If DebugBuild Then
  10.     ' Set the object's Value property.
  11.     lngValue.Value = &HFEEDBABE
  12.     ' Display the value of
  13.     ' the bytes.
  14.     Dim strHexResult As String
  15.     strHexResult = Hex(lngValue.HiWord.HiByte) & _
  16.         " " & _
  17.         Hex(lngValue.HiWord.LoByte) & _
  18.         " " & _
  19.         Hex(lngValue.LoWord.HiByte) & _
  20.         " " & _
  21.         Hex(lngValue.LoWord.LoByte)
  22.     ' Display the result in the Debug window.
  23.     Debug.Print Hex(lngValue.Value) & " " _
  24.         & strHexResult
  25.     End
  26.    #End If
  27. End Sub
  28.