View Single Post
  #1 (permalink)  
Old 03-15-2008, 05:43 PM
badkarma badkarma is offline
Senior Member
 
Join Date: Mar 2008
Posts: 114
Default Basic4ppc has encountered a problem ...

When I use this code ...

Quote:
Sub Globals
'Declare the global variables here.
Dim MyFileData
Dim MyFileDataPos
End Sub

Sub Len(len_mystr)
Return StrLength (len_mystr)
End Sub

Sub Mid(mid_mystr,mid_pos,mid_length)
Return SubString (mid_mystr,mid_pos-1,mid_length)
End Sub

Sub ReadMyNo

Do Until Mid(MyFileData, MyFileDataPos, 1) = Chr(10) OR MyFileDataPos > Len(MyFileData)
If Mid(MyFileData, MyFileDataPos, 1) <> " " Then ReadMyNo = ReadMyNo & Mid(MyFileData, MyFileDataPos, 1)
MyFileDataPos = MyFileDataPos + 1
Loop

MyFileDataPos = MyFileDataPos + 1

End Sub

Sub App_Start

MyFileDataPos = 1
MyFileData = " 10"&Chr(10)&" 20"&Chr(10)&" 30"&Chr(10)&" 40"&Chr(10)&" 50"&Chr(10)

Msgbox(readmyno)
Msgbox(readmyno)
Msgbox(readmyno)

End Sub
... Basic4ppc crashes out and shuts down with the WinXP message "Basic4ppc has encountered a problem and needs to close. We are sorry for the inconvenience. Any work you have been working on may have been lost."

... the code is good running under vb6.

It may be all the other stuff on my machine (vb.net etc conflicting?) but just thought I'd report it just in case.
Reply With Quote