BRiX
Advanced Computing Environment
Hosted by SourceForge
brix-os project page

Previous: Default Parameters ----- Up: Contents ----- Next: Modules

Void

A single underscore character represents a void element with various uses throughout the language.

Used as the value to declare uninitialized slots in interfaces.

	slot a:Int = _
Used to discard elements during a destructuring assignment.
	// grab first and third elements, ignore second
	(x, _, y) = 1..3

	// grab first and second elements, ignore rest
	(x, y, _) = 1..100

	// grab first and third, ignore second and rest
	(x, _, y, _) = 1..100

Previous: Default Parameters ----- Up: Contents ----- Next: Modules