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 16.1 ('London 2017')
Instant purchase and download via GumRoad!


Knowing Scope

What's the difference between public, private, and protected?

Issue: 16.1 (January/February 2018)
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: n>No description availabl
Article Length (in bytes): 17,361
Starting Page Number: r>
Article Number: 16106
Resource File(s):

Download Icon project16106.zip Updated: 2018-01-01 22:32:33

Related Link(s): None

Excerpt of article text...

Recently I got an email from an xDev reader wanting advice about scope. Scope is one of those tricky things that's powerful and useful, but can be confusing.

To learn about scope, let's first imagine a situation where scope didn't exist. Scope is basically about when an object or a variable is within a range or not. For instance, if I have a method where I define the variable i:

dim i as integer

I know that i exists within that method. If I go to a different method, i does not exist. If it did, coding in Xojo would be extremely confusing. I'd try to redefine i in that second method and Xojo would give me an error saying that i has already been defined. Basically, without scope, every variable and object would be global.

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