There are no default argument promotions on arguments that have packed decimal type when the called function does not include a prototype. This means that any function definition that contains packed decimal arguments has to be prototyped. Otherwise the behavior is undefined. The boundary alignment of an argument with packed decimal type depends on the size of the packed decimal type. To be specific:
The following example shows how to pass packed decimal variables to a function.
Figure 281. ILE C Source to Pass Packed Decimal Variable to a Function
|
The output is as follows:
+--------------------------------------------------------------------------------+ |x1 = 33.3 | |x2 = 55555.55555 | |x3 = 999.99 | |x4 = 88888888888888888888888888888 | +--------------------------------------------------------------------------------+
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.