O'Reilly logo

REALBasic: TDG, 2nd Edition by Matt Neuburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2.  The Basic Language

In Chapter 1 you wrote a working application with REALbasic, where the user can press a button and, in response, hears a beep and sees a little dialog. Just possibly, however, you’d like your application to do a little more than this when the user presses that button. In that case, you’re going to need to write some code, using REALbasic’s programming language, which (as the name implies) is a form of Basic. In this chapter, you’ll start to learn REALbasic’s Basic; in fact, you’ll learn all there is to know about it, except for the bits having to do with object-orientation. Those bits come in Chapter 3 and Chapter 4.

The name “Basic” is applied to any programming language that descends from the original BASIC (Beginner’s All-purpose Symbolic Instruction Code) invented in 1964 by Thomas Kurtz and the late John Kemeny. College courses about computers were new in those days, and BASIC was one of the first computer languages deliberately designed for teaching nonspecialist beginners to program. It gained popularity, in a somewhat bastardized form, in the mid-1970s when it was built in to early personal computers; these computers had tiny memories, but such wizards as Steve Wozniak and Bill Gates ingeniously constructed even tinier BASIC interpreters for them.

The original BASIC was characterized by a small, simple, English-like vocabulary and syntax, surrendering elegance and even convenience to let the user write acceptable code immediately, to shield ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required