SI is acronym for International System of units. The letter order of SI is because in French the name of the system is Système International d'unités. Units are second, metre (meter), kilogram, etcetera. There are also derived units like Hertz, Watt and Newton, and more.
Each assembly data block (ASMDATA/END ASMDATA) contains UTF-16 strings (WSTRING in PowerBASIC) of quantity name, unit name, symbol, pointer offsets and character count for each string. Details below.
There is nothing here that can't be quickly found with an Internet search. However, I noticed that on the web pages <sup> and </sup> tags were used for "squared" and "cubed" instead of the Unicode characters superscript 2 and superscript 3. When coping and pasting the result was a "normal" 2 or 3, not squared or cubed.
Jump to source code -
Include file of SI Unit ASMDATA blocks.
PBWin demo to lookup unit information from any
one of the tree items.
'file SI_Data.inc 'base units - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - asmdata TimeL 'offset to Quantity_Name always 8 dd 18 'offset to Unit_Name 10 + size Quanity name, offset this always 0 dd 32 'offset to Unit_Symbol 12 + sizes Quantity and Unit names, offset this always 4 dw 4, "time" 'char count for peek$$ then string dw 6, "second" dw 1, "s" end asmdata asmdata LengthL dd 22, 62 '1st block has 2 DDs to allow comments, like this for the rest. dw 6, "length" dw 19, "meter, metre, mètre" dw 1, "m" end asmdata asmdata MassL dd 18, 36 dw 4, "mass" dw 8, "kilogram" dw 2, "kg" end asmdata asmdata ElectricCurrentL dd 42, 56 dw 16, "electric current" dw 6, "ampere" dw 1, "A" end asmdata asmdata ThermodynamicTemperatureL dd 60, 74 dw 25, "thermodynamic temperature" dw 6, "kelvin" dw 1, "K" end asmdata asmdata AmountOfSubstanceL ' dd 48, 58 dw 19, "amount of substance" dw 4, "mole" dw 3, "mol" end asmdata asmdata LuminousIntensity '##### dd 46, 62 dw 18, "luminous intensity" dw 7, "candela" dw 2, "cd" end asmdata 'derived units with special names and symbols - - - - - - - - - - - - - - - - - asmdata PlaneAngleL dd 32, 46 dw 11, "plane angle" dw 6, "radian" dw 3, "rad" end asmdata asmdata SolidAngleL dd 32, 52 dw 11, "solid angle" dw 9, "steradian" dw 2, "sr" end asmdata asmdata FrequencyL dd 28, 40 dw 9, "frequency" dw 5, "hertz" dw 2, "Hz" end asmdata asmdata ForceWeightL dd 36, 50 dw 13, "force, weight" dw 6, "newton" dw 1, "N" end asmdata asmdata PressureStressL ' dd 42, 56 dw 16, "pressure, stress" dw 6, "pascal" dw 2, "Pa" end asmdata asmdata EnergyWorkHeatL dd 46, 58 dw 18, "energy, work, heat" dw 5, "joule" dw 1, "J" end asmdata asmdata PowerRadiantFluxL dd 48, 58 dw 19, "power, radiant flux" dw 4, "watt" dw 1, "W" end asmdata asmdata ElectricChargeL dd 40, 56 dw 15, "electric charge" dw 7, "coulomb" dw 1, "C" end asmdata asmdata ElectricPotenialVoltageEMFL dd 72, 82 dw 31, "electric potenial, voltage, emf" dw 4, "volt" dw 1, "V" end asmdata asmdata CapacitanceL dd 32, 44 dw 11, "capacitance" dw 5, "farad" dw 1, "F" end asmdata asmdata ResistanceImpedanceReatanceL ' dd 72, 80 dw 31, "resistance, impedance, reatance" dw 3, "ohm" dw 1, chr$$(&h03A9??) end asmdata asmdata ElectricalConductanceL dd 54, 100 dw 22, "electrical conductance" dw 22, "siemans (formerly mho)" dw 25, "S (SI), ", chr$$(&h2127??), " (non-ambiguous)" end asmdata asmdata MagneticFluxL dd 36, 48 dw 13, "magnetic flux" dw 5, "weber" dw 2, "Wb" end asmdata asmdata MagneticFluxDensityL dd 52, 64 dw 21, "magnetic flux density" dw 5, "tesla" dw 1, "T" end asmdata asmdata InductanceL dd 30, 42 dw 10, "inductance" dw 5, "henry" dw 1, "H" end asmdata asmdata TemperatureL dd 32, 64 dw 11, "temperature" dw 15, "degrees Celsius" dw 2, "°C" end asmdata asmdata LuminousFluxL dd 36, 48 dw 13, "luminous flux" dw 5, "lumen" dw 2, "lm" end asmdata asmdata IlluminanceL dd 32, 40 dw 11, "illuminance" dw 3, "lux" dw 2, "lx" end asmdata asmdata RadioactiveDecaysPerSecondL dd 68, 88 dw 29, "radioactive decays per second" dw 9, "becquerel" dw 2, "Bq" end asmdata asmdata RadiationDoseIonisingL dd 60, 70 dw 25, "radiation dose (ionising)" dw 4, "gray" dw 2, "Gy" end asmdata asmdata RadiationEquivalentDoseL dd 82, 98 dw 36, "radiation equivalent dose (Ionising)" dw 7, "sievert" dw 2, "Sv" end asmdata asmdata CatalyticActivityL dd 46, 58 dw 18, "catalytic activity" dw 5, "katal" dw 3, "kat" end asmdata 'Coherent Derived Units - - - - - - - - - - - - - - - - - - - - - - - - - - - - asmdata AreaL dd 18, 44 dw 4, "area" dw 12, "square meter" dw 2, "m", chr$$(&h00B2??) end asmdata asmdata VolumeL dd 22, 46 dw 6, "volume" dw 11, "cubic meter" dw 2, "m", chr$$(&h00B3??) end asmdata asmdata SpeedVelocityL dd 40, 76 dw 15, "speed, velocity" dw 17, "meters per second" dw 3, "m/s" end asmdata asmdata AccelerationL dd 34, 86 dw 12, "acceleration" dw 25, "meters per second squared" dw 4, "m/s", chr$$(&h00B2??) end asmdata asmdata WaveNumberVergenceL dd 50, 84 dw 20, "waveNumber, vergence" dw 16, "reciprocal meter" dw 3, "m", chr$$(&h207B??, &h00B9??) end asmdata asmdata DensityL dd 24, 74 dw 7, "density" dw 24, "kilogram per cubic meter" dw 5, "kg/m", chr$$(&h00B3??) end asmdata asmdata SurfaceDensityL dd 40, 92 dw 15, "surface density" dw 25, "kilogram per square meter" dw 5, "kg/m", chr$$(&h00B2??) end asmdata asmdata SpecificVolumeL dd 38, 88 dw 14, "specfic volume" dw 24, "cubic meter per kilogram" dw 5, "m", chr$$(&h00B3??), "/kg" end asmdata asmdata CurrentDensityL dd 40, 88 dw 15, "current density" dw 23, "ampere per square meter" dw 4, "A/m", chr$$(&h00B2??) end asmdata asmdata MagneticFieldStrengthL dd 56, 90 dw 23, "magnetic field strength" dw 16, "ampere per meter" dw 3, "A/m" end asmdata asmdata ConcentrationMolecularL dd 60, 102 dw 25, "concentration (molecular)" dw 20, "mole per cubic meter" dw 6, "mol/m", chr$$(&h00B3??) end asmdata asmdata MassConcentrationL dd 46, 96 dw 18, "mass concentration" dw 24, "kilogram per cubic meter" dw 5, "kg/m", chr$$(&h00B3??) end asmdata asmdata LuminanceL dd 28, 78 dw 9, "luminance" dw 24, "candela per square meter" dw 5, "cs/m", chr$$(&h00B2??) end asmdata 'Derived Units with special names - - - - - - - - - - - - - - - - - - - - - - - asmdata DynamicViscosityL dd 44, 72 dw 17, "dynamic viscosity" dw 13, "pascal-second" dw 4, "Pa·s" 'Pa·s end asmdata asmdata MomentOfForceL dd 56, 82 dw 23, "moment of force, torque" dw 12, "newton-meter" dw 3, "N·m" end asmdata asmdata SurfaceTensionL dd 40, 74 dw 15, "surface tension" dw 16, "newton per meter" dw 3, "N/m" end asmdata asmdata AngularVelocityAngularFrequencyL dd 80, 116 dw 35, "angular velocity, angular frequency" dw 17, "radian per second" dw 5, "rad/s" end asmdata asmdata AngularAccelerationL dd 50, 102 dw 20, "angular acceleration" dw 25, "radian per second squared" dw 6, "rad/s", chr$$(&h00B2??) end asmdata asmdata HeatFluxDensityIrradianceL dd 68, 112 dw 29, "heat flux density, irradiance" dw 21, "watt per square meter" dw 4, "W/m", chr$$(&h00B2??) end asmdata asmdata EntropyHeatCapacityL dd 54, 88 dw 22, "entropy, heat capacity" dw 16, "joule per kelvin" dw 3, "J/K" end asmdata asmdata SpecificHeatCapacitySpecificEntropyL dd 90, 142 dw 40, "specific heat capacity, specific entropy" dw 25, "joule per kilogram-kelvin" dw 8, "J/(kg·K)" end asmdata asmdata SpecificEnergyL dd 40, 78 dw 15, "specific energy" dw 18, "joule per kilogram" dw 4, "J/kg" end asmdata asmdata ThermalConductivityL dd 50, 94 dw 20, "thermal conductivity" dw 21, "watt per meter-kelvin" dw 7, "W/(m·K)" end asmdata asmdata EnergyDensityL dd 38, 82 dw 14, "energy density" dw 21, "joule per cubic metre" dw 4, "J/m", chr$$(&h00B3??) end asmdata asmdata ElectricFieldStrengthL dd 56, 86 dw 23, "electric field strength" dw 14, "volt per meter" dw 3, "V/m" end asmdata asmdata ElectricChargeDensityL dd 56, 104 dw 23, "electric charge density" dw 23, "coulomb per cubic meter" dw 4, "C/m", chr$$(&h00B3??) end asmdata asmdata SurfaceChargeDensityElectricFluxDensityL dd 116, 166 dw 53, "surface charge, electric flux density or displacement" dw 24, "coulomb per square meter" dw 4, "C/m", chr$$(&h00B2??) end asmdata asmdata PermittivityL dd 34, 66 dw 12, "permittivity" dw 15, "farad per meter" dw 3, "F/m" end asmdata asmdata PermeabilityL dd 34, 66 dw 12, "permeability" dw 15, "henry per meter" dw 3, "H/m" end asmdata asmdata MolarEnergyL dd 34, 64 dw 12, "molar energy" dw 14, "joule per mole" dw 5, "J/mol" end asmdata asmdata MolarEntropyMolarHeatCapacityL dd 78, 122 dw 34, "molar entropy, molar heat capacity" dw 21, "joule per mole-kelvin" dw 9, "J/(mol·K)" end asmdata asmdata ExposureL dd 58, 100 dw 24, "exposure (x- and ", chr$$(&h03B3??), "-rays)" dw 20, "coulomb per kilogram" dw 4, "C/kg" end asmdata asmdata AbsorbedDoseRateL dd 46, 78 dw 18, "absorbed dose rate" dw 15, "gray per second" dw 4, "Gy/s" end asmdata asmdata RadiantIntensityL dd 44, 82 dw 17, "radiant intensity" dw 18, "watt per steradian" dw 4, "W/sr" end asmdata asmdata RadianceL dd 26, 90 dw 8, "radiance" dw 31, "watt per square meter-steradian" dw 9, "W/(m", chr$$(&h00B2??), "·sr)" end asmdata asmdata CatalyticActivityConcentrationL dd 74, 118 dw 32, "catalytic activity concentration" dw 21, "katal per cubic meter" dw 6, "kat/m", chr$$(&h00B3??) end asmdata
'Copyleft (ɔ) 2022 by Dale Yarker; do what you want with this code except claim it, 'or sell it, as yours. No warranty of any kind. #compile exe #dim all 'selected in callback, (better) allows SELECT CASE AS CONST rather than AS LONG %ID_FromQuantityOpt = 1001 %ID_FromUnitOpt = 1002 %ID_FromSymbolOpt = 1003 %ID_OptionFrame = 1004 %ID_PickCBx = 1005 'not selected in callback, need IDs to modify these controls %ID_ResultALbl = 1101 %ID_ResultATxtBx = 1102 %ID_ResultBLbl = 1103 %ID_ResultBTxtBx = 1104 'used in load and callback of combobox, again sequential for AS CONST %FromQuantName = 1& %FromUnitName = 2& %FromSymbolName = 3& #include "./SI_Data.inc" sub LoadComboBox(byval hMainDlg as dword, byval FromID as long) as long local pSI_Item, pItemCharCnt, ItemCharCnt, pItemStr, ItemOffset as dword local CBIdx as long combobox reset hMainDlg, %ID_PickCBx control set text hMainDlg, %ID_ResultATxtBx, "" control set text hMainDlg, %ID_ResultBTxtBx, "" pSI_Item = codeptr(AbsorbedDoseRateL) : gosub ComboBxItem pSI_Item = codeptr(AccelerationL) : gosub ComboBxItem pSI_Item = codeptr(AmountOfSubstanceL) : gosub ComboBxItem pSI_Item = codeptr(AngularAccelerationL) : gosub ComboBxItem pSI_Item = codeptr(AngularVelocityAngularFrequencyL) : gosub ComboBxItem pSI_Item = codeptr(AreaL) : gosub ComboBxItem pSI_Item = codeptr(CapacitanceL) : gosub ComboBxItem pSI_Item = codeptr(CatalyticActivityL) : gosub ComboBxItem pSI_Item = codeptr(CatalyticActivityConcentrationL) : gosub ComboBxItem pSI_Item = codeptr(ConcentrationMolecularL) : gosub ComboBxItem pSI_Item = codeptr(CurrentDensityL) : gosub ComboBxItem pSI_Item = codeptr(DensityL) : gosub ComboBxItem pSI_Item = codeptr(DynamicViscosityL) : gosub ComboBxItem pSI_Item = codeptr(ElectricChargeL) : gosub ComboBxItem pSI_Item = codeptr(ElectricChargeDensityL) : gosub ComboBxItem pSI_Item = codeptr(ElectricalConductanceL) : gosub ComboBxItem pSI_Item = codeptr(ElectricCurrentL) : gosub ComboBxItem pSI_Item = codeptr(ElectricFieldStrengthL) : gosub ComboBxItem pSI_Item = codeptr(ElectricPotenialVoltageEMFL) : gosub ComboBxItem pSI_Item = codeptr(EnergyDensityL) : gosub ComboBxItem pSI_Item = codeptr(EnergyWorkHeatL) : gosub ComboBxItem pSI_Item = codeptr(EntropyHeatCapacityL) : gosub ComboBxItem pSI_Item = codeptr(ExposureL) : gosub ComboBxItem pSI_Item = codeptr(ForceWeightL) : gosub ComboBxItem pSI_Item = codeptr(FrequencyL) : gosub ComboBxItem pSI_Item = codeptr(HeatFluxDensityIrradianceL) : gosub ComboBxItem pSI_Item = codeptr(IlluminanceL) : gosub ComboBxItem pSI_Item = codeptr(InductanceL) : gosub ComboBxItem pSI_Item = codeptr(LengthL) : gosub ComboBxItem pSI_Item = codeptr(LuminanceL) : gosub ComboBxItem pSI_Item = codeptr(LuminousFluxL) : gosub ComboBxItem pSI_Item = codeptr(LuminousIntensity) : gosub ComboBxItem pSI_Item = codeptr(MagneticFieldStrengthL) : gosub ComboBxItem pSI_Item = codeptr(MagneticFluxL) : gosub ComboBxItem pSI_Item = codeptr(MagneticFluxDensityL) : gosub ComboBxItem pSI_Item = codeptr(MassL) : gosub ComboBxItem pSI_Item = codeptr(MassConcentrationL) : gosub ComboBxItem pSI_Item = codeptr(MolarEnergyL) : gosub ComboBxItem pSI_Item = codeptr(MolarEntropyMolarHeatCapacityL) : gosub ComboBxItem pSI_Item = codeptr(MomentOfForceL) : gosub ComboBxItem pSI_Item = codeptr(PermeabilityL) : gosub ComboBxItem pSI_Item = codeptr(PermittivityL) : gosub ComboBxItem pSI_Item = codeptr(PlaneAngleL) : gosub ComboBxItem pSI_Item = codeptr(PowerRadiantFluxL) : gosub ComboBxItem pSI_Item = codeptr(PressureStressL) : gosub ComboBxItem pSI_Item = codeptr(RadianceL) : gosub ComboBxItem pSI_Item = codeptr(RadiantIntensityL) : gosub ComboBxItem pSI_Item = codeptr(RadiationDoseIonisingL) : gosub ComboBxItem pSI_Item = codeptr(RadiationEquivalentDoseL) : gosub ComboBxItem pSI_Item = codeptr(RadioactiveDecaysPerSecondL) : gosub ComboBxItem pSI_Item = codeptr(ResistanceImpedanceReatanceL) : gosub ComboBxItem pSI_Item = codeptr(SpecificEnergyL) : gosub ComboBxItem pSI_Item = codeptr(SpecificHeatCapacitySpecificEntropyL) : gosub ComboBxItem pSI_Item = codeptr(SpecificVolumeL) : gosub ComboBxItem pSI_Item = codeptr(SpeedVelocityL) : gosub ComboBxItem pSI_Item = codeptr(SolidAngleL) : gosub ComboBxItem pSI_Item = codeptr(SurfaceChargeDensityElectricFluxDensityL) : gosub ComboBxItem pSI_Item = codeptr(SurfaceDensityL) : gosub ComboBxItem pSI_Item = codeptr(SurfaceTensionL) : gosub ComboBxItem pSI_Item = codeptr(TemperatureL) : gosub ComboBxItem pSI_Item = codeptr(ThermalConductivityL) : gosub ComboBxItem pSI_Item = codeptr(ThermodynamicTemperatureL) : gosub ComboBxItem pSI_Item = codeptr(TimeL) : gosub ComboBxItem pSI_Item = codeptr(VolumeL) : gosub ComboBxItem pSI_Item = codeptr(WaveNumberVergenceL) : gosub ComboBxItem ' exit sub 'don't "fall" into subroutine when done - - - - - - - - - - - - ComboBxItem: select case as const FromID case %FromQuantName pItemCharCnt = pSI_Item + 8??? ItemCharCnt = mak(dword, peek(word, pItemCharCnt), 0??) pItemStr = pSI_Item + 10??? case %FromUnitName ItemOffset = peek(dword, pSI_Item) pItemCharCnt = ItemOffset + pSI_Item ItemCharCnt = mak(dword, peek(word, pItemCharCnt), 0??) pItemStr = pItemCharCnt + 2??? case %FromSymbolName ItemOffset = peek(dword, (pSI_Item + 4)) pItemCharCnt = ItemOffset + pSI_Item ItemCharCnt = mak(dword, peek(word, pItemCharCnt), 0??) pItemStr = pItemCharCnt + 2??? end select combobox add hMainDlg, %ID_PickCBx, peek$$(pItemStr, ItemCharCnt) to CBIdx combobox set user hMainDlg, %ID_PickCBx, CBIdx, pSI_Item control set user hMainDlg,%ID_PickCBx, 1, FromID return end sub callback function MainDlgCB() as long local FromID, ItemIdx as long local pSI_Item, ItemOffset, pSI_ItemStr, ItemCharCnt as dword if cb.msg = %wm_command then select case as const cb.ctl case %ID_FromQuantityOpt if cb.ctlmsg = %bn_clicked then LoadComboBox cb.hndl, %FromQuantName control set text cb.hndl, %ID_ResultALbl, "Unit Name" control set text cb.hndl, %ID_ResultBLbl, "Symbol" end if case %ID_FromUnitOpt if cb.ctlmsg = %bn_clicked then LoadComboBox cb.hndl, %FromUnitName control set text cb.hndl, %ID_ResultALbl, "Quantity Name" control set text cb.hndl, %ID_ResultBLbl, "Symbol" end if case %ID_FromSymbolOpt if cb.ctlmsg = %bn_clicked then LoadComboBox cb.hndl, %FromSymbolName control set text cb.hndl, %ID_ResultALbl, "Quantity Name" control set text cb.hndl, %ID_ResultBLbl, "Unit Name" end if case %ID_PickCBx if cb.ctlmsg = %cbn_selchange then control get user cb.hndl, %ID_PickCBx, 1 to FromID combobox get select cb.hndl, %ID_PickCBx to ItemIdx combobox get user cb.hndl, %ID_PickCBx, ItemIdx to pSI_Item select case as const FromID case %FromQuantName ItemOffset = peek(dword, pSI_Item) pSI_ItemStr = pSI_Item + ItemOffset ItemCharCnt = mak(dword, peek(word, pSI_ItemStr), 0??) pSI_ItemStr += 2 control set text cb.hndl, %ID_ResultATxtBx, _ peek$$(pSI_ItemStr, ItemCharCnt) ItemOffset = peek(dword, (pSI_Item + 4)) pSI_ItemStr = pSI_Item + ItemOffset ItemCharCnt = peek(word, pSI_ItemStr) pSI_ItemStr += 2 control set text cb.hndl, %ID_ResultBTxtBx, _ peek$$(pSI_ItemStr, ItemCharCnt) case %FromUnitName ItemOffset = 8??? pSI_ItemStr = pSI_Item + ItemOffset ItemCharCnt = mak(dword, peek(word, pSI_ItemStr), 0??) pSI_ItemStr += 2 control set text cb.hndl, %ID_ResultATxtBx, _ peek$$(pSI_ItemStr, ItemCharCnt) ItemOffset = peek(dword, (pSI_Item + 4)) pSI_ItemStr = pSI_Item + ItemOffset ItemCharCnt = peek(word, pSI_ItemStr) pSI_ItemStr += 2 control set text cb.hndl, %ID_ResultBTxtBx, _ peek$$(pSI_ItemStr, ItemCharCnt) case %FromSymbolName ItemOffset = 8??? pSI_ItemStr = pSI_Item + ItemOffset ItemCharCnt = mak(dword, peek(word, pSI_ItemStr), 0??) pSI_ItemStr += 2 control set text cb.hndl, %ID_ResultATxtBx, _ peek$$(pSI_ItemStr, ItemCharCnt) ItemOffset = peek(dword, pSI_Item ) pSI_ItemStr = pSI_Item + ItemOffset ItemCharCnt = peek(word, pSI_ItemStr) pSI_ItemStr += 2 control set text cb.hndl, %ID_ResultBTxtBx, _ peek$$(pSI_ItemStr, ItemCharCnt) end select end if end select end if end function function pbmain () as long local hMainDlg as dword dialog default font "Microsoft Sans Serif", 12, 0, 1 dialog new 0, "SI Unit Names, Quanities And Symbols", , , 188, 120, _ %ds_3dlook or %ds_modalframe or %ds_nofailcreate or %ds_setfont or _ %ws_caption or %ws_clipsiblings or %ws_dlgframe or %ws_minimizebox or _ %ws_popup or %ws_sysmenu, _ %ws_ex_left or %ws_ex_ltrreading or %ws_ex_rightscrollbar to hMainDlg control add option, hMainDlg, %ID_FromQuantityOpt, "From Quantity Name", _ 8, 12, 76, 11, _ %bs_left or %bs_vcenter or %ws_group or %ws_tabstop, %ws_ex_left control add option, hMainDlg, %ID_FromUnitOpt, "From Unit Name", _ 8, 23, 75, 11 control add option, hMainDlg, %ID_FromSymbolOpt, "From Symbol", _ 8, 34, 75, 11 control add frame, hMainDlg, %ID_OptionFrame, "Find Name Or Symbol", _ 5, 3, 82, 45, %bs_left or %ws_group, %ws_ex_left control add combobox, hMainDlg, %ID_PickCBx, , 5, 53, 180, 60, _ %cbs_disablenoscroll or %cbs_dropdown or %cbs_hasstrings or %cbs_sort or _ %cbs_nointegralheight or %ws_group or %ws_tabstop or %ws_vscroll, _ %ws_ex_clientedge or %ws_ex_left control add label, hMainDlg, %ID_ResultALbl, "", 6, 70, 100, 9 control add textbox, hMainDlg, %ID_ResultATxtBx, "", 5, 79, 172 , 11 control add label, hMainDlg, %ID_ResultBLbl, "", 6, 95, 100, 9 control add textbox, hMainDlg, %ID_ResultBTxtBx, "", 5, 104, 172, 11 ' dialog show modal hMainDlg call MainDlgCB end function
To
Domain Home. | To Dale's Notebook index. | To Programs index. |