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.

Array but not array

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-22-2007, 07:52 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 Array but not array

Hi, guys

I have an array of 25 items named from st1 to st25....I need this to not be an array as it is much simples to the rest of the code....so my question is how can i refer to stx wit a for next loop?

I have tryed:

for x = 1 to 25
st&x="ON"
Next x

This doesn't work

The reason I need it to not be an array is that I use one sub to test the value of each item but the array can be of 9, 12 or 25 items depending on user choice...
Yes I know a normal array would be more suitable, but if I can do without...the better....
__________________
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
  #2 (permalink)  
Old 09-22-2007, 08:09 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You could use the ArrayLen method to find the array length:
Code:
for x = 0 to ArrayLen(myArr())-1
 myArr(x) = 
"ON"
next
Also consider using an ArrayList which is more powerful than a regular array.
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
Nullifying an Array mjcoon Questions (Windows Mobile) 1 06-20-2008 05:20 PM
Filling an array or structure. enonod Questions (Windows Mobile) 4 05-02-2008 11:56 AM
How to redimension an array of structures HARRY Code Samples & Tips 3 02-20-2008 11:53 AM
Array of Array possibility? Stellaferox Basic4ppc Wishlist 0 09-18-2007 12:16 PM
More Dimensional Array Xardas Questions (Windows Mobile) 4 07-01-2007 02:11 PM


All times are GMT. The time now is 11:17 AM.


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