1,459 bytes added
, 07:06, 20 February 2020
<div style="font-size:30px">'''UNITSOF(Numeric,Units,Description,MatchAllOnLeft,MatchRightExactly)'''</div><br/>
*<math>Numeric</math> is any number.
*<math>Units</math> can be of any Unit.
==Description==
*This function converts the string to a number with units specified.
**To convert the current value of a variable to a different unit, simply use the <> operator: a<>cm;
*Any multi unit indication should be in () to avoid confusion with normal code that may mean something else. For 1 meter/second, 1(m/s) or 1<>(m/s) should be used
*The following list is basic conversion Units:
MassUnits:g,sg,lbm,u,ozm,
DistanceUnits:m,mi,Nmi,in,ft,yd,ang,Pica,
TimeUnits:yr,day,hr,mn,sec,year,s,min,hour,
PressureUnits:Pa,atm,mmHg,
ForceUnits:N,dyn,lbf,
EnergyUnits:J,e,c,cal,eV,HPh,Wh,flb,BTU,
PowerUnits:HP,W,
MagnetismUnits:T,ga,
LiquidUnits:tsp,tbs,oz,cup,pt,qt,gal,l,
Prefixes:Y,Z,E,P,T,G,M,k,h,e,d,c,m,u,n,p,FValue,a,z,y,
Others:rad,deg,F,C,K,dollar,euro,cent,rupee
*Using Units function we can do with arithmetic Operations also.
*For Example: UNITS("1km")<+>UNITS("2cm")
==Examples==
# UNITSOF(34,"km") = 34km
# UNITSOF(20,"l") = 20l
# UNITSOF("98 ga") = 98 ga
==See Also==
*[[Manuals/calci/TOUNITS | TOUNITS ]]
*[[Manuals/calci/UNITSOF| UNITSOF ]]
*[[Manuals/calci/CONVERT | CONVERT ]]
==References==
*[http://en.wikipedia.org/wiki/Conversion_of_units Convert Units]
*[[Z_API_Functions | List of Main Z Functions]]
*[[ Z3 | Z3 home ]]