contents.gifprev1.gifnext1.gif

CNVRT_WGHT() - Convert weights

Converts a number from one weight related measurement to another. Conversions between Kilogram, Gram, Pound, Ounce, and Slug.

Conversion table

Kilogram
KG
Gram
GM
Pound
LBM
Ounce
OZM
Slug
SG
Returns

Double value if successful. If an error occurs, this function returns a zero.

Arguments

Type
Field
Description
double
dNumber
Quantity
string
dFrom
Convert from
string
dTo
Convert to
16 bit DLL declarations

PowerBuilder Function declaration

function double CNVRT_WGHT(double dNumber, string dFrom, string dTo) library "IFL16.DLL"

Visual Basic Function declaration

Declare Function CNVRT_WGHT lib "IFL16" (ByVal dNumber As Double, ByVal dFrom As String, ByVal dTo As String) As Double

C/C++ Synopsis

#include "function.h"

double CNVRT_WGHT(double dNumber, LPSTR dFrom, LPSTR dTo)

32 bit DLL declarations

PowerBuilder Function declaration

function double CNVRT_WGHT(double dNumber, string dFrom, string dTo) library "IFL32.DLL"

Visual Basic Function declaration

Declare Function CNVRT_WGHT lib "IFL32" (ByVal dNumber As Double, ByVal dFrom As String, ByVal dTo As String) As Double

C/C++ Synopsis

#include "function.h"

double CNVRT_WGHT(double dNumber, LPSTR dFrom, LPSTR dTo)

Example:

dNumber
=
500

dFrom
=
lbm

dTo
=
ozm

Result: 8,000 (ounces)