Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 4.4


Basic Data Structures, Part I

Finding for the most efficient data structure

Issue: 4.4 (March/April 2006)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 13,166
Starting Page Number: 34
Article Number: 4413
Related Link(s): None

Excerpt of article text...

It is a rare computer program that doesn't manage data -- information -- of some kind. A word processor manages text. Games need to remember high scores, player information, game progress, and more. Basically any program that creates files has to manage that data in memory before it is written to disk. Most programs need ways to organize and display this data, to allow the user to edit the data, and to save and retrieve the data. How this data is organized in memory is known as a data structure; using the correct data structure for your project can be the difference between success and failure, a project completed on time or lengthy delays caused by frustrating difficult-to-find bugs. The right data structure can also make updating and adding features to your program easier.

When I first began programming, I knew nothing about data structures: I simply used whatever was convenient or available in the language. This usually meant that I used arrays. Years later as I moved from BASIC to Pascal, I discovered records (called structures in other languages), pointers, and linked lists. Suddenly, what used to be such a simple decision that it was no decision at all, was complicated, and I had to think about my long-term goals.

Thinking long-term is key when planning your data structure. Your program tomorrow won't be the same program it is today. Initially you just want to get it working; later you may want to add features such as data sorting or the storage of additional information. You might also want to speed up program operations and optimize functions.

...End of Excerpt. Please purchase the magazine to read the full article.