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.

Connection Name

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2010, 12:10 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default Connection Name

Now we have data types, can someone tell me the type of the Connection Name parameter in FileOpen etc? I need to pass it to a Sub with other typed parameters, and to make the code read well it needs to be the first parameter. I've blindly tried a few things, no type specified, number, integer, int64, even string, but keep being told I haven't set the parameter to a valid instance of an object. To try to get a clue, I've tried examining the value in a working piece of file code but the debugger refuses to indicate the value.

Yes, yes the file exists, the second file open parameter is correct etc etc. I don't need that sort of help, at least not yet, maybe later.

I just want to know what the data type is please? Should this be in the FileOpen help text?
Reply With Quote
  #2 (permalink)  
Old 06-07-2010, 12:42 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default

It gets worse.

Sub A had a file variable hrFile and Sub B had a parameter hFile and is called from A. That didn't work so I created globals hFile and hrFile removed the hrFile Dim from A and the hFile parameter from B.

If I make A say hFile = hrFile and call B, then B still fails.

If I don't do that but change B to refer to hrFile, then B works!

So not only does passing a file parameter cause me problems, a simple assignment doesn't seem to work either. I think I need to expand the scope of my previous post. Can one do anything at all with a Connection Name other than pass it to a predefined Sub?
Reply With Quote
  #3 (permalink)  
Old 06-07-2010, 01:02 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by RacingDog View Post
I just want to know what the data type is please?
I think that the answer is that there is no type attached to Connection Name.

It is more like an "Object", which also cannot be passed as a parameter to a Sub that you have defined. Or like a global (objects are also Global in this sense) and you cannot define a Sub formal parameter to have the same variable name as a global.

So I believe that it is not possible to write a Sub which can perform operations on an arbitrary opened file that is passed to it.

Erel said recently that the introduction of types into version 6.90 has been pervasive and taken a lot of work, so is not purporting to make the leap to a fully typed language.

Mike.
Reply With Quote
  #4 (permalink)  
Old 06-07-2010, 01:18 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default

Ahuh. I see. Dang. Unless anybody has anything to say differently,this will need some reconsideration.

Quote:
Originally Posted by mjcoon View Post
, so is not purporting to make the leap to a fully typed language.

Mike.
That's fine, but until someone goes through the help files and specifies the limits, then knowing where the limits of what can be done are located is going to continue to be hit and miss, leading to more posts, and not just from me. Basically, unless a limitation is stated, it can't be distiguished from a bug by the average user who is not part of the magic circle who have acsess to the full story.

Thanks for the input.
Reply With Quote
  #5 (permalink)  
Old 06-07-2010, 05:10 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I think that it is a good point (and a good post). Due to historical reasons the connection name is not a variable.

The work for Basic4ppc Android has started. The syntax will be more or less the same, however I do plan to fix such issues as there are no backwards compatibility problems.
Reply With Quote
  #6 (permalink)  
Old 06-08-2010, 07:42 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default OT

Off Topic...

Quote:
Originally Posted by Erel View Post
...The work for Basic4ppc Android has started...
Reply With Quote
  #7 (permalink)  
Old 06-10-2010, 10:03 PM
linum's Avatar
Senior Member
 
Join Date: Sep 2008
Posts: 108
Default

Quote:
Originally Posted by specci48 View Post
Off Topic...


I second that

Let me know when a Beta is available. I'm really interested...
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
create a RAS dialup connection miataman Questions (Windows Mobile) 0 08-11-2009 03:50 PM
Serial Connection to internal GPS Hitec Questions (Windows Mobile) 3 07-02-2009 01:31 PM
Connection is not closed ClarkVent Questions (Windows Mobile) 7 11-10-2008 02:33 PM
Connection between different socket mircome Questions (Windows Mobile) 3 07-19-2008 11:05 AM
hold on a GPRS-connection schimanski Questions (Windows Mobile) 3 01-15-2008 04:48 PM


All times are GMT. The time now is 10:53 AM.


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