Special

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 1.3

COLUMN

Welcome to the REALbasic Developer Magazine Beginner's Corner!

Issue: 1.3 (December/January 2002)
Author: Thomas J. Cunningham
Article Description: No description available.
Article Length (in bytes): 9,887
Starting Page Number: 28
Article Number: 1314
Resource File(s):

Download Icon 1314.zip Updated: 2013-03-11 19:07:56

Related Link(s): None

Excerpt of article text...

This is the third installment in our series for beginning REALbasic programmers. Our first column (Issue 1.1) dealt with an overview of the RB Integrated Development Environment. Last time (Issue 1.2) I introduced the concept of variables and data types. This month, we will press forward by discussing two important programming constructs.

Subroutines and Functions

One of the challenges of trying to teach and explain computer programming concepts is trying to get beginners to think like a machine, or understand how a machine thinks. As I've probably stated before, programming a computer is based upon logic and math. By logic, I refer to the order of how data is processed by our computer, and math is, of course, manipulating data.

Subroutines and functions are like little independent factories working away in your program. They are custom factories because you, as the programmer, create these factories to help you with your work. This goes hand in hand with the fundamental concept used by RB: Object Oriented Programming.

We have not fully defined what we mean by objects yet, but for now, think of an object as data, or a collection of data. Think of our factories as people. People who know how to do a particular craft or trade. People who you hire to perform certain duties for you. People who work on objects..

Subroutines and Functions in RB are referred to as Methods. We have two categories of methods.

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