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
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
howa 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
objectsyet, 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.