Multiply a quantity into a quantity definition¶
saf_multiply_quantity
is a function defined in quant.c.
Synopsis:
-
int
saf_multiply_quantity
(SAF_ParMode pmode, SAF_Quantity *quantity, SAF_Quantity *multiplier, int power)¶
Formal Arguments:
quantity
:IN``[``OUT
] The quantity which is affected by this operationmultiplier
: What to multiply intoquantity
power
: Number of times to multiplymultiplier
intoquantity
Description: After creating a new quantity with saf_declare_quantity, the quantity
is defined by multiplying powers
of other quantities into it, one per call to this function. A division can be accomplished by supplying a
negative power
(a power
of zero has no effect).
Preconditions:
pmode
must be valid. (low-cost)quantity
must be a valid quantity handle. (low-cost)multiplier
must be a valid quantity handle. (low-cost)
Return Value: This function returns some non-negative value on success; otherwise, it either returns a negative value or raises an exception, depending on the error handling property of the library.
Parallel Notes: Depends on the pmode
argument.
See Also:
- saf_declare_quantity: 20.9: Declare a new quantity
- saf_divide_quantity: 20.11: Divide a quantity into a quantity definition
- Quantities: Introduction for current chapter