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 operation
  • multiplier: What to multiply into quantity
  • power: Number of times to multiply multiplier into quantity

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: