VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "classCOBscript"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' COB script class. '

Option Explicit

Public Name As String
Private Code() As Long

Public Sub LoadScript(File As Integer, Size As Long)
    ReDim Code(Size - 1)
    Get File, , Code()
End Sub

Public Sub DisplayScript(Buffer As String, Codes() As classCOBcode)
    Dim Index As Long
    Dim i As Long
    Dim Flag As Boolean
    
    On Error GoTo Error
    For Index = 0 To UBound(Code)
        Flag = False
        For i = 0 To UBound(Codes)
            If Codes(i).Value = CStr(Hex(Code(Index))) Then
                Flag = True
                Exit For
            End If
        Next
        If Flag Then
            Buffer = Buffer & CStr(Hex(Code(Index))) & Chr(9) & Codes(i).Name & Chr(13) & Chr(10)
        Else
            Buffer = Buffer & Chr(9) & Chr(9) & CStr(Code(Index)) & Chr(13) & Chr(10)
        End If
    Next
Error:
End Sub
