Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Beta Versions
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Beta Versions This forum is the place to discuss issues regarding Basic4ppc beta versions.

Return bug (Maybe?)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2010, 09:10 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default Return bug (Maybe?)

It may not count as a bug but an explicit Return without a value in a typed Sub appears to return null in the IDE. Compiled there is no problem as a default return value is provided, presumably to satisfy the C# compiler.

Code:
...
var = test(
True)
...
Sub test(b As BooleanAs Boolean
  ...
  
Return ' causes a null exception in the caller
  ...
End Sub
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 03-02-2010 at 01:27 PM.
Reply With Quote
  #2 (permalink)  
Old 03-02-2010, 05:42 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I think it is a bug, as it will confuse the user.
I've changed it to return the default value.
__________________
Basic4android documentation
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sub and Value Return merli Questions (Windows Mobile) 4 01-05-2010 07:47 AM
Can a sub return more than 1 value ? TWELVE Questions (Windows Mobile) 13 05-28-2008 10:58 AM
All hail GeoTrail's return RandomCoder Chit Chat 1 02-17-2008 01:14 PM
Return value from Form ghislain Questions (Windows Mobile) 5 12-23-2007 08:34 AM
return issue Cableguy Questions (Windows Mobile) 1 09-21-2007 07:01 AM


All times are GMT. The time now is 09:28 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0