Following packages are used:
# METHOD 1: use '*u"<units>"'
a = 9.18*u"m/s^2"
# METHOD 2:
v0 = 5u"m/s"
Normal print
function will display them
uconvert(u"yr", t1)
# unconvert(<convert to>, <given param>)
h = 10*u"\hbar"
println(h)
print(typeof(h))
print(upreferred(h))
NOTE Default value of upreferred
function is SI units, but it can changed to CGS as follows:
using Unitful
Unitful.preferunits(u"cm,g,s"...)