<-- Previous || Up || Next -->

Convert Text Files Test Function
Units Class

Function ConvertTextFilesTest( _
      ByVal vFromFiles As String _
    , ByVal vFileNameSeparator As String _
    ) As Integer
    ' Perform some important consistency checks of the unit, prefix, and global text replacement definitions
    ' stored within text files.

    'Return Value:  Function returns True when no errors are found within the measurement definition files.
    ' Returns False when errors are found within the definitions.
    ' The function will perform all of its consistency checks before returning a value;
    ' it does not stop when it encounters errors.
    '  Debug.Print ConvertTextFilesTest("", "")
    'Notes: Perform important consistency checks on combinations of measurement conversion tables.
    ' This is the function that I use to check 1) the built-in definitions alone, and 2) the built-in definitions
    ' in combination with the supplemental data file.  I have left it here as an example for you to use in case
    ' you check custom data files that you have produced.

    If Len(vFromFiles) = 0 Then
        ' Initialize the measurement conversion system if necessary.
        ' Clear all unit, prefix, and text replacement definitions.
        ' Specify that the built-in definitions should not be automatically loaded.
        InitializeDone = True

        ' Initialize the system by loading the definitions contained within the specified data files.
        Dim strRtn As String
        strRtn = LoadFiles(vFromFiles, vFileNameSeparator, False)
        If Len(strRtn) Then
            Debug.Print strRtn
            Exit Function
        End If
    End If

    ConvertTextFilesTest = ConvertTest()
End Function

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.