Example of using a UDT to hold a string of Str$(numbers), actaully x,y locations stored in sequence of x y x y x y...
Pretty cool print job too!
Code: (Select All)
Type Mask
xys As String
End Type
Screen _NewImage(1024, 200, 32): _ScreenMove 100, 60
Cls , &HFF000000
Print "Hello World!"
Dim hello As Mask
nolight~& = Point(0, 15)
For y = 0 To 20
For x = 0 To 12 * 8
If Point(x, y) <> nolight~& Then hello.xys = hello.xys + Str$(x) + Str$(y)
Next
Next
Print "Press any to continue... zzz"
Sleep
ReDim msk(0) As String
Split hello.xys, " ", msk()
Cls
i = 0
While i < UBound(msk) - 2
For r = 0 To 10
Line (10 * Val(msk(i + 1)) + 40, 10 * Val(msk(i + 2)) + 10)-Step(r + 3.5, r + 3.5), _RGB32(255 - r ^ .8 * 25), B
Next
i = i + 2
Wend
Sub Split (SplitMeString As String, delim As String, loadMeArray() As String)
Dim curpos As Long, arrpos As Long, LD As Long, dpos As Long 'fix use the Lbound the array already has
curpos = 1: arrpos = LBound(loadMeArray): LD = Len(delim)
dpos = InStr(curpos, SplitMeString, delim)
Do Until dpos = 0
loadMeArray(arrpos) = Mid$(SplitMeString, curpos, dpos - curpos)
arrpos = arrpos + 1
If arrpos > UBound(loadMeArray) Then ReDim _Preserve loadMeArray(LBound(loadMeArray) To UBound(loadMeArray) + 1000) As String
curpos = dpos + LD
dpos = InStr(curpos, SplitMeString, delim)
Loop
loadMeArray(arrpos) = Mid$(SplitMeString, curpos)
ReDim _Preserve loadMeArray(LBound(loadMeArray) To arrpos) As String 'get the ubound correct
End SubPretty cool print job too!
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

