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

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

Code Samples & Tips Share your recent discoveries and ideas with other users.

How to redimension an array of structures

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-20-2008, 10:18 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default How to redimension an array of structures

Hi,

In Sub Globals I declared:

Dim Type (a,b,c,d) S (0) As Int32

When the program is running, I find out the number of structures I need. How can I redimension this array?

Harry
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 10:36 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should use:
Code:
Dim S(x,4'x - number of structures. 4 -number of fields
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 11:17 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

If for some reason you really want the array to be of type Int32 then you will need

Dim (x,4) As Int32

otherwise you will get a normal (string) array.
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 11:53 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

Thanks both of you for the prompt Help

Harry
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
Legal Structures ?? adbftrainer Questions (Windows Mobile) 9 09-09-2008 05:54 PM
Create an array of structures serge Questions (Windows Mobile) 1 06-21-2008 07:55 PM
How to declare array of structures of bytes HARRY Questions (Windows Mobile) 3 02-13-2008 04:28 PM
Structures & Uppercase skipper Questions (Windows Mobile) 4 02-06-2008 06:00 AM
Array of Array possibility? Stellaferox Basic4ppc Wishlist 0 09-18-2007 12:16 PM


All times are GMT. The time now is 09:43 PM.


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