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.

Structure variables

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2007, 11:36 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default Structure variables

This example is also included in the desktop installation.
The PieChart is an example of using the new structure variables to better organize the data.

As the number of "slices" is not known, it is first declared with 0 items.
Later, after reading the data file it is redeclared again as a two dimension array. The second dimension value is 5 as the number of fields in the structure.

It is important to understand that structures are converted to arrays during compilation.
A regular (not array) structure will be converted to a one dimension array and an array structure will be converted to an array with one more dimension.
The last dimension length is always as the number of fields in the structure.
Attached Files
File Type: zip Pie.zip (1.5 KB, 160 views)
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
Header structure Erel Beta Versions 3 08-27-2008 08:37 PM
Environment Variables Zenerdiode Questions (Windows Mobile) 1 05-22-2008 04:36 PM
Filling an array or structure. enonod Questions (Windows Mobile) 4 05-02-2008 12:56 PM
Help about variables/objects skipper Questions (Windows Mobile) 6 12-19-2007 04:45 PM
Dim-ing variables colin9876 Questions (Windows Mobile) 8 11-17-2007 06:47 PM


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


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