comp • gb.report • reportunits • unittocm

ReportUnits.UnitToCm (gb.report)

Static Function UnitToCm ( Value As Float, Unit As String ) As Float

Converts a value in a certain unit to centimeters.

  • Value is the value to be converted.

  • Unit is the unit the value has to be converted from.

Only the units in AllowedUnits are valid.

Example

Public Sub Main()

  Dim f As Float
  'Converts 1.5 inches to centimeters and prints the output
  f = UnitToCm(1.5, "in")
  Print f

End

Above example will print 3.81000762001524.

So 1.5 inches = 3.81000762001524 centimeters.