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.

Undeclared array error with version 5

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2007, 06:20 PM
Junior Member
 
Join Date: Apr 2007
Posts: 42
Send a message via Yahoo to mwaite
Default Undeclared array error with version 5

OK maybe I'm jumping the gun a little, but I couldn't help but notice B4PPC v5 is posted! (admitedly I was checking emails and the web just in case)

Thought I would recompile an application coded from v4 to see if I can get any speed improvement with v5

When I try to run the program I get a compiling error: Use of undeclared array
Here's the line: Dim NewArray(y) as Byte

Isn't DIM doing just that, declaring the array?

(the y variable is passed to the sub)
__________________
Regards,
Mike

PPC Cingular 8525 WM5 4Gb SD
Reply With Quote
  #2 (permalink)  
Old 05-18-2007, 06:32 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Mwait
In the "What's New" page is stated that one of the new features of v5 is the ability to turn on or off alerts about unused or empty variables....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!

Last edited by Cableguy : 05-18-2007 at 06:34 PM.
Reply With Quote
  #3 (permalink)  
Old 05-18-2007, 06:41 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Arrays and structures must be first declared in Sub Globals.
You can later declare them again with a different size if needed.
Reply With Quote
  #4 (permalink)  
Old 05-18-2007, 06:57 PM
Junior Member
 
Join Date: Apr 2007
Posts: 42
Send a message via Yahoo to mwaite
Default

Thank you Erel.

And thank you for v5. (Just playing with the trial version right now, waiting for my email )

I want you to know I searched the entire help file before posting because I didn't want to ask a stupid question - and hey, didn't see it, so it wasn't a stupid question, right?
__________________
Regards,
Mike

PPC Cingular 8525 WM5 4Gb SD
Reply With Quote
  #5 (permalink)  
Old 05-18-2007, 07:04 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It was a very important question and I'm sure that the answer will help others too.
Arrays in Basic4ppc are always global variables.
Reply With Quote
  #6 (permalink)  
Old 05-18-2007, 07:06 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

In my book, There's no such thing as a "stupid Question", there are "already answered question"....

In the OLD forum I once said that "one should be proud of what one know, but humble enough to learn with others", or something like that....Be carefull with the GUN though....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #7 (permalink)  
Old 05-19-2007, 10:39 AM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
"one should be proud of what one know, but humble enough to learn with others"
I said it last time and I'll say it again - very profound words my friend

Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
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
Error when using an array of types zurpa Questions (Windows Mobile) 8 02-26-2011 07:41 AM
Error with new version micro Questions (Windows Mobile) 5 10-16-2008 07:13 PM
Version 6.01 compiling error Gerd Bug Reports 2 01-04-2008 08:56 AM
SQLite error with version 5 HARRY Questions (Windows Mobile) 3 05-21-2007 09:43 AM
Index was out of range error in version 5 HARRY Questions (Windows Mobile) 6 05-20-2007 08:16 AM


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


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