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.

How to declare array of structures of bytes

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-13-2008, 02:52 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
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, 03:17 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

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

Use:
SomeName(6).x = 65
Reply With Quote
  #3 (permalink)  
Old 02-13-2008, 03:39 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
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, 04:28 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate bits and bytes schimanski Questions (Windows Mobile) 2 08-30-2008 02:13 PM
Create an array of structures serge Questions (Windows Mobile) 1 06-21-2008 07:55 PM
How to redimension an array of structures HARRY Code Samples & Tips 3 02-20-2008 11:53 AM
How to convert image to an array of bytes kolbe Questions (Windows Mobile) 2 02-08-2008 07:43 PM
A few nibles, bits and bytes of silence... Cableguy Chit Chat 3 09-13-2007 04:40 PM


All times are GMT. The time now is 06:58 AM.


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