informix
INFORMIX-ESQL/C Programmer's Manual
ESQL/C Function Library

invdivdbl()

The invdivdbl() function divides an interval value by a numeric value.

Syntax

Usage

The input and output qualifiers must both belong to the same interval class: either the year to month class or the day to fraction(5) class. If the qualifier for ov is different from the qualifier for iv (within the same class), the invdivdbl() function extends the result (as the invextend() function defines).

The invdivdbl() function divides the interval value in iv by num and stores the result in ov.

The value in num can be either a positive or a negative value.

Return Codes

0 The division was successful.
<0 The division failed.
-1200 A numeric value is too large (in magnitude).
-1201 A numeric value is too small (in magnitude).
-1202 The num parameter is zero (0).
-1265 Overflow occurred on an interval operation.
-1266 An interval value is incompatible with the operation.
-1268 A parameter contains an invalid interval qualifier.

Example

The demo directory contains this sample program in the file invdivdbl.ec.

Output


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved