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.


Input String is wrong format


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2007, 01:02 PM
Newbie
 
Join Date: May 2007
Posts: 9
Default Input String is wrong format

The following code fails at runtime on version 5, with the error message "Input string is wron format" What does this mean? Under version 4 of b4ppc property returned the string "LAN, GPRS, WI-FI,RAS,or blank"

What changed? Do we now need to cast the return to a sting some how?

Thanks,
Ron

property = getSelection()

Sub getSelection
x = cBBn.SelectedIndex
Select x
Case 0
media = "LAN"
Case 1
media = "GPRS"
Case 2
media = "Wi-Fi"
Case 3
media = "RAS"
Case -1
media = "blank"
End Select
return media
End Sub
Reply With Quote
  #2 (permalink)  
Old 05-22-2007, 02:28 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,815
Default

You should write: property = getSelection
As there are no arguments.
Reply With Quote
  #3 (permalink)  
Old 05-22-2007, 07:43 PM
Newbie
 
Join Date: May 2007
Posts: 9
Default Subs without parameters

That was the problem. The answer was also right in the documentation

"Subs syntax starts with "Sub SubName (Parameters)" and ends with "End Sub".If there are no parameters for the sub, then write "Sub SubName" without the parenthesis.There are no functions in Basic4ppc but instead every sub can return a value with the keyword "Return""

Thanks,
Ron
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
Wrong values on GPS Roadrunner Bug Reports 1 01-31-2008 07:10 PM
SerialDevice - wrong version Erel Announcements 0 11-05-2007 04:53 AM
Returning subroutine error - Input string was not in the correct format HarleyM Questions & Help Needed 4 10-20-2007 06:45 AM
Get a input string from user vinians Questions & Help Needed 10 09-04-2007 10:43 PM


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


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