Function UnitCategoryUnknownTest( _ ) As Integer ' Review all unit definitions whose user-specified Category is "unkown" and see their actual/calculated Category ' is known. Const strFn = "UnitCategoryUnkownTest" Debug.Print strFn & ": Info: Begin " & Time ' Assume that the definitions are valid; will reset return value to False when ' and if errors are found in the definitions. UnitCategoryUnknownTest = True InitializeMaybe Dim lngCurUnit As Long For lngCurUnit = 1 To GetUnitCount Dim strUniCode As String Dim strUniCat As String Dim strUniType As String Dim varIgn As Variant If Not GetUnit(lngCurUnit, strUniCode, varIgn, varIgn, varIgn, varIgn, varIgn, strUniCat, strUniType) Then UnitCategoryUnknownTest = False Exit Function End If ' User-specified Category must be "unknown" If StrComp(strUniCat, "unknown", vbTextCompare) = 0 Then ' Unit must not be a Synonym-type definition. If StrComp(strUniType, TypeSynonym, vbTextCompare) <> 0 Then Dim strcat As String strcat = FindCategory(strUniCode) ' Display actual/calculated Category if it is not "unknown" If StrComp(strcat, "unknown", vbTextCompare) <> 0 Then Debug.Print strFn & ": Note: " & strUniCode & " category is " & strcat End If End If End If Next lngCurUnit Debug.Print strFn & ": Info: End " & Time End Function
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.