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.


How to declare array of structures of bytes


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-13-2008, 03:52 PM
Senior Member
 
Join Date: Apr 2007
Location: Netherlands
Posts: 102
Default How to declare array of structures of bytes

Hi,

I tried several possibilities, but I do not succeed to declare the following:

an array (10) of structures; each structure consisting of two fields of the type Byte.


Please help,

Harry
Reply With Quote
  #2 (permalink)  
Old 02-13-2008, 04:17 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
Default

Declare:
Dim Type(x,y) SomeName(10) As Byte

Use:
SomeName(6).x = 65
Reply With Quote
  #3 (permalink)  
Old 02-13-2008, 04:39 PM
Senior Member
 
Join Date: Apr 2007
Location: Netherlands
Posts: 102
Default

Erel,

My problem appeared not to be the declaration, but the addressing,

Many thanks,

Harry
Reply With Quote
  #4 (permalink)  
Old 02-13-2008, 05:28 PM
Basic4ppc Veteran
 
Join Date: May 2007
Posts: 210
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default array - type

Harry
It is equivalent to two-dimensional array:
the array somename can be reffered to as somename(i,j) where the i can go from 0 to 9 and the j from 0 to 1.

Example:
Dim Type(No,Surname,Name,Nick,Father,Mother,Spouse,Mar riage,Sex,Fcod,Mcod,Scod,Gen,Pic,Birth,Death,Prev_ N)DB(2500)
Dim Type(No,Surname,Name,Nick,Father,Mother,Spouse,Mar riage,Sex,Fcod,Mcod,Scod,Gen,Pic,Birth,Death,Prev_ N)record
.......

For i = 1 To dbsize
For j = 0 To 16
db(i,j) = record(j)
Next
Next
__________________
David Erez
Ramat Hasharon, Israel
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
Calculate bits and bytes schimanski Questions & Help Needed 2 08-30-2008 03:13 PM
Create an array of structures serge Questions & Help Needed 1 06-21-2008 08:55 PM
How to redimension an array of structures HARRY Code Samples & Tips 3 02-20-2008 12:53 PM
How to convert image to an array of bytes kolbe Questions & Help Needed 2 02-08-2008 08:43 PM
A few nibles, bits and bytes of silence... Cableguy Chit Chat 3 09-13-2007 05:40 PM


All times are GMT. The time now is 02:10 PM.


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