Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips
Home Register FAQ Members List 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, 10:36 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,816
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, 86 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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment Variables Zenerdiode Questions & Help Needed 1 05-22-2008 03:36 PM
Filling an array or structure. enonod Questions & Help Needed 5 05-02-2008 11:56 AM
automatic typecasting of variables? Stellaferox Questions & Help Needed 4 02-04-2008 12:17 PM
Help about variables/objects skipper Questions & Help Needed 6 12-19-2007 03:45 PM
Dim-ing variables colin9876 Questions & Help Needed 8 11-17-2007 05:47 PM


All times are GMT. The time now is 02:14 AM.


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