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

Previous: Key::Value ----- Up: Contents ----- Next: Void

Default Parameters

Most extensions (DEF, DEFX, DEFTYPE) support default values for each parameter. Parameters with default values must be placed after those without default values.

	foo := def (text:String, size:Int = 14, font:String = "Verdana") ...
	foo("some text")
	foo("some text", 16, "Arial")

Parameter Labels
Keys can be used to label each parameter for readability but any parameter without a label must be in the correct position. Labels allow some default parameters to be changed without requiring all those before them to be specified.

	foo("some text", font:: "Arial")
	foo(font:: "Arial", text:: "some text")

Previous: Key::Value ----- Up: Contents ----- Next: Void