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

Text Plot Asterisk Sample Sub
Math Arithmetic Class

Private Sub TextPlotAsteriskSample()
    ' Print a bunch of straight lines that all cross at the origin.
    ' They look something like the asterisk character when plotted.

    Const NUMS = 64

    Dim avarNums() As Variant
    ReDim avarNums(0 To 2, 0 To NUMS * 16)
    Dim intOut As Integer

    Dim dblSlope As Double
    For dblSlope = -2.5 To 2.5 Step 1
        Dim intX As Integer
        For intX = 1 To NUMS
            intOut = intOut + 1
            avarNums(1, intOut) = CDbl(intX - NUMS / 2)
            avarNums(2, intOut) = CDbl(intX - NUMS / 2) * dblSlope
        Next intX
    Next dblSlope

    ReDim Preserve avarNums(LBound(avarNums, 1) To UBound(avarNums, 1), LBound(avarNums, 2) To intOut)

    Debug.Print
    Debug.Print TextPlot(avarNums(), Null, Null)
End Sub

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