Type:Number

From HackerspaceWiki
Jump to: navigation, search

The datatype Number is used for properties that contain any kind of number, whole numbers, decimal, and floating point numbers. It can be positive or negative, with thousand separators, and can have an optional exponent. For example, [[Psi beam:=4,297.31 e7]]

It allows for giving units after the number as well. Though Type:Number does not understand units (i.e. it performs no automatic conversion), a unit can be used to distinguish attribute values with different units. For example, [[Psi beam:=42 mindmelds]].

You can also use or create your own datatype that is aware of units, see Custom units.

Type:Number is a universal replacement for the separate datatypes and Float used in earlier versions of Semantic MediaWiki. The Integer and Float datatypes are aliases for Type:Number in SMW 1.0.

Personal tools