Sha256: 98ad9e94d2637711338fe2893a534d541441d1fc769e9ae962366ea36132aca2

Contents?: true

Size: 759 Bytes

Versions: 34

Compression:

Stored size: 759 Bytes

Contents

---
layout: post
title:  "Global Variable"
keywords: App, PApplet, $
permalink: objects/global.html
---
A global variable in ruby a name beginning with `$`. It can be referred to from anywhere in a program. Before initialization, a global variable has the special value nil. Global variables should be used sparingly. They are dangerous because they can be written to from anywhere. Overuse of globals can make isolating bugs difficult; it also tends to indicate that the design of a program has not been carefully thought out. Whenever you do find it necessary to use a global variable, be sure to give it a descriptive name that is unlikely to be inadvertently used for something else later (calling it something like $foo as above is probably a bad idea).

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
picrate-2.5.2-java docs/_objects/global/global.md
picrate-2.5.1-java docs/_objects/global/global.md
picrate-2.5.0-java docs/_objects/global/global.md
picrate-2.4.2-java docs/_objects/global/global.md
picrate-2.4.1-java docs/_objects/global/global.md
picrate-2.4.0-java docs/_objects/global/global.md
picrate-2.3.0-java docs/_objects/global/global.md
picrate-2.2.0-java docs/_objects/global/global.md
picrate-2.1.2-java docs/_objects/global/global.md
picrate-2.1.1-java docs/_objects/global/global.md
picrate-2.1.0-java docs/_objects/global/global.md
picrate-2.0.1-java docs/_objects/global/global.md
picrate-1.3.0-java docs/_objects/global/global.md
picrate-2.0.0.pre-java docs/_objects/global/global.md
picrate-1.2.4-java docs/_objects/global/global.md
picrate-1.2.3-java docs/_objects/global/global.md
picrate-1.2.2-java docs/_objects/global/global.md
picrate-1.2.1-java docs/_objects/global/global.md
picrate-1.2.0-java docs/_objects/global/global.md
picrate-1.1.0-java docs/_objects/global/global.md