Using variable arguments with decimal data types

You can use the va_arg macro with a decimal type decimal(n,p). Each invocation of va_arg modifies arg_ptr so that the values of successive arguments are returned in turn.
var_type va_arg( va_list arg_ptr, var_type );