Manuals/calci/UNITS
UNITS(String)
- is any Unit name with Value.
Description
- This function converts the string to a number with units specified.
- If a variable needs to be specified in specific units, simply use the <> operator. Such as: a<>(m/sec).
- 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
- UNITS("5km") = 5km
- UNITS("2m")<+>UNITS("8m") = 10m
- UNITS("6kg")<+>UNITS("5kg") = 11kg
See Also
References