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

Rnd Verify Sub
Random Values Class

Private Sub RndVerify()
    ' "Random Verify"
    ' Review of the built-in Rnd function which indicates the bits of the return value that never differ.

    'See also:
    '  RndBitsVerify
    '  RndBytesVerify

    Dim varIgnore As Variant
    varIgnore = TrueEveryNSeconds(0)

    Dim strLast As String
    strLast = BinaryStringFmString(MakeVarType(Rnd), True, False)

    Dim strSame As String
    strSame = String$(Len(strLast), "X")

    Do While True
        Dim strCur As String
        strCur = BinaryStringFmString(MakeVarType(Rnd), True, False)

        Dim intCurPos As Integer
        For intCurPos = 1 To Len(strCur)
            If Mid$(strCur, intCurPos, 1) <> Mid$(strLast, intCurPos, 1) Then Mid$(strSame, intCurPos, 1) = " "
        Next intCurPos

        If TrueEveryNSeconds(est.TestInterval) Then Exit Do

        strLast = strCur

    Debug.Print strCur
    Debug.Print strSame
End Sub

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