Difference between revisions of "Manuals/calci/UNITSOF"
Jump to navigation
Jump to search
(Created page with "<div style="font-size:30px">'''UNITSOF(Numeric,Units,Description,MatchAllOnLeft,MatchRightExactly)'''</div><br/> *<math>Numeric</math> is any number. *<math>Units</math> can b...") |
|||
Line 39: | Line 39: | ||
==See Also== | ==See Also== | ||
*[[Manuals/calci/TOUNITS | TOUNITS ]] | *[[Manuals/calci/TOUNITS | TOUNITS ]] | ||
− | *[[Manuals/calci/ | + | *[[Manuals/calci/UNITS| UNITS ]] |
*[[Manuals/calci/CONVERT | CONVERT ]] | *[[Manuals/calci/CONVERT | CONVERT ]] | ||
Latest revision as of 01:26, 24 February 2020
UNITSOF(Numeric,Units,Description,MatchAllOnLeft,MatchRightExactly)
- is any number.
- 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
References