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.

CallSub error ?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2010, 09:32 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default CallSub error ?

I don't know if it is bug or a restriction.

I saw that the CallSub keyword accepts only String variables in the argument list. Why doesn't it accept Number variables ?

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #2 (permalink)  
Old 03-10-2010, 11:01 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

It's a deliberate restriction. Only Subs with 0 to 3 ByVal String parameters and a String return may be be invoked by CallSub. The reason is because of the way CallSub works in a compiled application. It uses .NET delegate types, which are a sort of pointer to a function. Each Sub signature (number and types of parameters and return type) needs its' own delegate type so the restriction limits the number of delegate types needed to four. In fact this same restriction already exists in previous versions of Basic4ppc.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 03-10-2010 at 11:04 AM.
Reply With Quote
  #3 (permalink)  
Old 03-10-2010, 12:05 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Thank you for the explanation.
Of course it was noticed in the previous B4PPC versions as all variables were Strings.

Best regards.
__________________
Klaus
Switzerland
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
CallSub doesn't respect Public agraham Bug Reports 1 12-06-2009 06:32 PM
callsub error wolko Questions (Windows Mobile) 8 03-11-2009 09:01 AM


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


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