Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Bug Reports
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.


Basic4ppc has encountered a problem ...


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-15-2008, 05:43 PM
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
  #2 (permalink)  
Old 03-15-2008, 05:47 PM
Senior Member
 
Join Date: Mar 2008
Posts: 114
Default

forgot to mention:

b4ppc = v6.05
.net v2.0.50727.1433
unreg version

winxp sp2
Reply With Quote
  #3 (permalink)  
Old 03-15-2008, 05:49 PM
Senior Member
 
Join Date: Mar 2008
Posts: 114
Default

hmmm - just a thought - could be because i am setting readmyno = xxx

will use temp string instead of 'readmyno=' and retry and report back ...
Reply With Quote
  #4 (permalink)  
Old 03-15-2008, 05:55 PM
Senior Member
 
Join Date: Mar 2008
Posts: 114
Default

aha! got it tracked down ...

if you replace the above sub readmyno with this one ...

Quote:
Sub ReadMyNo
Dim rmn
rmn = ""
Do Until Mid(MyFileData, MyFileDataPos, 1) = Chr(10) OR MyFileDataPos > Len(MyFileData)
If Mid(MyFileData, MyFileDataPos, 1) <> " " Then
rmn = rmn & Mid(MyFileData, MyFileDataPos, 1)
End If
MyFileDataPos = MyFileDataPos + 1
Loop

MyFileDataPos = MyFileDataPos + 1
Return rmn

End Sub
It then works OK.

But I think compiler needs to say "error: cannot assign readmyno a value!" (or something like that ) instead of crashing out...

(readmyno was a function under vb6)

will now check rest of my code and replace as required...

If this crashes on your system, it may be adviseable to fix as I guess other users porting frrom vb6 may get same error and it might turn them off what is otherwise a cool devkit.

I'll keep reporting back this kind of stuff as I progress my conversions ...

Steve
Reply With Quote
  #5 (permalink)  
Old 03-15-2008, 06:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,185
Default

Thank you for reporting this bug. It will be fixed in the next release (a proper error message should show).
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exceptions encountered agraham Bug Reports 17 07-27-2007 10:24 PM


All times are GMT. The time now is 02:47 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0