define new user unit
Parameters
specify name :string :literal
value :unit :quantity
Attributes
symbol | :string | define main unit symbol |
describes | :string | set corresponding property for new unit |
property | | define a new property |
Returns
Examples
copy
specify 'nauMile 1.1508`mi
print 2`nauMile ; 2 nauMile
print 3`nauMile --> `km ; 5.5560992256 km
copy
specify.symbol:"NM" 'nauMile 1.1508`mi
print 2`nauMile ; 2 NM
copy
specify.describes:"coding speed" 'lph `lines/h
print 100`lph ; 100 lph
print property 100`lph ; coding speed
copy
specify.property "sweetness" `tspSugar
print property 3`tspSugar ; sweetness
Related