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

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

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Passing arrays to Subs.

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 04-17-2009, 11:05 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
Calling without parentheses refers to Subs declared without a parameter list. I suspect you are trying to call a Sub that needs one or more parameters without the parentheses in which case the compiler will complain.
Hi Andrew, I assure you that your suspicions are unfounded. However further experimentation shows that my quote from the help apparently only applies to Subs that are declared without any return value typing. Since I like strong typing (I started with Algol-60 back in the 60s!) I like to use typing if the Sub is meant to return a value. Then I find that I have to put "()" in the declaration even if the Sub has no parameters.

This sort of stuff reminds me that although Algol-60 had just as much of a problem with defining the semantics as any other language, at least its syntax was tightly specified, so that syntactic units could be referred to unambiguously.

Regards, Mike.
Reply With Quote
  #12 (permalink)  
Old 04-17-2009, 11:15 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by mjcoon View Post
Since I like strong typing
So do I. One of the best things to happen to C was the introduction of strong typing in Borland and ANSI C - and it's one of the reasons I love .NET. But as Basic4ppc is untyped I don't understand what you mean at all - though I'm probably being stupid and missing the obvious.

Quote:
I like to use typing if the Sub is meant to return a value. Then I find that I have to put "()" in the declaration even if the Sub has no parameters.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #13 (permalink)  
Old 04-24-2009, 09:05 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
... But as Basic4ppc is untyped I don't understand what you mean at all - though I'm probably being stupid and missing the obvious.
No, no, it's certainly not your stupidity, it's my inability to conform combined with Basic4ppc's acquiescence that caught me.

Following on from my use of Visual Basic at work, I had been declaring Subs with typing, and Basic4ppc had been indulging me, though perhaps just ignoring the types I specified. That was when I found that if I omitted the "()" to signify no parameter list that Basic4ppc started complaining.

In the interim I have now got my program working transferring binary data over serial RS232. So thank you very much for your work on sorting out the 0x1A problem, for providing SerialEx.dll and for your assistance to me. The BytesConverter.dll was crucial in interpreting the numerics embedded in the (Garmin GPS) binary stream, too.

Best wishes, Mike.
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
IDE subs list width klaus Beta Versions 1 09-28-2008 03:56 AM
How to use timer to clock speed of subs? Stellaferox Questions (Windows Mobile) 4 02-28-2008 07:07 AM
Passing arrays in B4PPC6? Frank Questions (Windows Mobile) 1 01-14-2008 12:15 PM
Passing references to tables to subs LineCutter Questions (Windows Mobile) 5 05-31-2007 08:27 PM


All times are GMT. The time now is 09:13 AM.


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