Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Returning subroutine error - Input string was not in the correct format


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-19-2007, 07:44 PM
Junior Member
 
Join Date: Apr 2007
Location: Kerikeri, New Zealand
Posts: 21
Send a message via MSN to HarleyM
Unhappy Returning subroutine error - Input string was not in the correct format

Hi all,
It's been a while since I have been using basic4ppc & visited this forum. In the meantime I can see so much has happened..

Anyway, I have attempted to upgrade a program I was writing in version 4 to version 5. After debugging the initial program errors associated with the new compiller I was able to run the program. Unfortunately I encounter an error during the run which I have never seen before. "Input string was not in the correct format" appears after returning from a subroutine. I have single stepped my way through the subroutine which opens a form which itself opens a subroutine & then another. As I step through the code it returns back along the path closing respective subs until it comes back to the original subroutine call instruction- thats when I get this error. The error allows me to continue & everything seems to function correctly until it comes up again & again as more subs are called. I suspect a stack return problem but can't understand why it would work fine in version 4 & not in 5.

I apologize if this has been covered elsewhere, I searched for it but haven't found what I'm looking for. Any ideas?
Reply With Quote
  #2 (permalink)  
Old 10-19-2007, 07:50 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,807
Default

Can you post the part of your code that makes this problem?
Reply With Quote
  #3 (permalink)  
Old 10-19-2007, 10:51 PM
Junior Member
 
Join Date: Apr 2007
Location: Kerikeri, New Zealand
Posts: 21
Send a message via MSN to HarleyM
Default What I think are the relevant parts of my program ...

Sub App_Start
...
If FileExist(Filepath & "Autolog.atl") = false then
fileopen(c1,Filepath & "Autolog.atl",cWrite)
Fileclose (c1)
NewVehicle ()
vehicle.Show
else
fileopen(c1,Filepath & "Autolog.atl",cRead)
s = fileread(c1)
if s <> eof then
for x=1 to 7
i = StrIndexOf (s,",",0)
if i < 0 then
Col(x) = SubString(s,0,StrIndexOf(s," ",0))
x=7
else
Col(x) = SubString(s,0,i)
s= SubString(s,i+1,StrLength(s))
end if
next x
...
FileClose(c1)
LoadData () ' <<<<<<------------------------error occurs here when it returns after doing the LoadData sub
else
FileClose (c1)
NewVehicle ()
Vehicle.Show
end if
end if
....
End sub

Sub LoadData
...
fileopen(c1,OdometerRecs,cRead)
s = fileread(c1)
do while s <> EOF
....
loop
fileclose(c1)
DataRecords.Show
...
End Sub

Sub DataRecords_Show
.....
Set4OdoTab(10)
End Sub

Sub Set4OdoTab(TabRef)
.... 'sets up tabbing conditions for controls in datarecords form
End Sub

Last edited by HarleyM : 10-19-2007 at 10:58 PM.
Reply With Quote
  #4 (permalink)  
Old 10-20-2007, 02:21 AM
Junior Member
 
Join Date: Apr 2007
Location: Kerikeri, New Zealand
Posts: 21
Send a message via MSN to HarleyM
Red face I do believe that the sub calling syntax has changed...

could it be that a should be calling my subs without brackets if i'm not passing data...
Reply With Quote
  #5 (permalink)  
Old 10-20-2007, 06:45 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,807
Default

Yes. You should just write the name of the sub.
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
Sender returning control name derez Bug Reports 2 10-21-2007 06:44 PM
Error message: "Not correct version of dll" BjornF Questions & Help Needed 5 09-17-2007 03:16 PM
Get a input string from user vinians Questions & Help Needed 10 09-04-2007 10:43 PM
Input String is wrong format lairdre Questions & Help Needed 2 05-22-2007 07:43 PM


All times are GMT. The time now is 04:42 PM.


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