block
A block of code that can be run. Many programming languages (most notably Smalltalk and Ruby) use blocks (also known as "block closures") as a way of passing a chunk of code to a method which can then run it in its own context. Java's "anonymous inner classes" are a way to achieve the same thing without direct support for blocks. C# uses "delegates" to achieve a similar purpose.
Copyright © 2003-2008 Gerard Meszaros all rights reserved