Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Undeclared array error with version 5


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2007, 07: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, 07:32 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,463
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing

Last edited by Cableguy : 05-18-2007 at 07:34 PM.
Reply With Quote
  #3 (permalink)  
Old 05-18-2007, 07:41 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
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, 07: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, 08:04 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
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, 08:06 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,463
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #7 (permalink)  
Old 05-19-2007, 11:39 AM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 487
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
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error with new version micro Questions & Help Needed 5 10-16-2008 08:13 PM
Version 6.01 compiling error Gerd Bug Reports 2 01-04-2008 09:56 AM
Error when using an array of types zurpa Questions & Help Needed 5 10-27-2007 09:19 PM
SQLite error with version 5 HARRY Questions & Help Needed 3 05-21-2007 10:43 AM
Index was out of range error in version 5 HARRY Questions & Help Needed 6 05-20-2007 09:16 AM


All times are GMT. The time now is 01:51 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0