/* Processed by ecpg (regression mode) */ /* These include files are added by the preprocessor */ #include <ecpglib.h> #include <ecpgerrno.h> #include <sqlca.h> /* End of automatic include section */ #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
typedefunsignedchar NumericDigit; typedefstruct
{ int ndigits; /* number of digits in digits[] - can be 0! */ int weight; /* weight of first digit */ int rscale; /* result scale */ int dscale; /* display scale */ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
NumericDigit *buf; /* start of alloc'd space for digits[] */
NumericDigit *digits; /* decimal digits */
} numeric;
typedefstruct
{ int ndigits; /* number of digits in digits[] - can be 0! */ int weight; /* weight of first digit */ int rscale; /* result scale */ int dscale; /* display scale */ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
NumericDigit digits[DECSIZE]; /* decimal digits */
} decimal;
#ifdef __cplusplus extern"C"
{ #endif
numeric *PGTYPESnumeric_new(void);
decimal *PGTYPESdecimal_new(void); void PGTYPESnumeric_free(numeric *var); void PGTYPESdecimal_free(decimal *var);
numeric *PGTYPESnumeric_from_asc(char *str, char **endptr); char *PGTYPESnumeric_to_asc(numeric *num, int dscale); int PGTYPESnumeric_add(numeric *var1, numeric *var2, numeric *result); int PGTYPESnumeric_sub(numeric *var1, numeric *var2, numeric *result); int PGTYPESnumeric_mul(numeric *var1, numeric *var2, numeric *result); int PGTYPESnumeric_div(numeric *var1, numeric *var2, numeric *result); int PGTYPESnumeric_cmp(numeric *var1, numeric *var2); int PGTYPESnumeric_from_int(signedint int_val, numeric *var); int PGTYPESnumeric_from_long(signedlongint long_val, numeric *var); int PGTYPESnumeric_copy(numeric *src, numeric *dst); int PGTYPESnumeric_from_double(double d, numeric *dst); int PGTYPESnumeric_to_double(numeric *nv, double *dp); int PGTYPESnumeric_to_int(numeric *nv, int *ip); int PGTYPESnumeric_to_long(numeric *nv, long *lp); int PGTYPESnumeric_to_decimal(numeric *src, decimal *dst); int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst);
#ifdef __cplusplus
} #endif
#endif/* PGTYPES_NUMERIC */
#line8"outofscope.pgc"
/* exec sql begin declare section */
#line1"struct.h"
/* dec_t */
typedefstruct mytype MYTYPE ;
#line9"struct.h"
typedefstruct mynulltype MYNULLTYPE ;
#line19"struct.h"
#line11"outofscope.pgc"
struct mytype { #line3"struct.h" int id ;
#line4"struct.h" char t [ 64 ] ;
#line5"struct.h" double d1 ;
#line6"struct.h" double d2 ;
#line7"struct.h" char c [ 30 ] ;
} ; struct mynulltype { #line13"struct.h" int id ;
#line14"struct.h" int t ;
#line15"struct.h" int d1 ;
#line16"struct.h" int d2 ;
#line17"struct.h" int c ;
} ;/* exec sql end declare section */ #line12"outofscope.pgc"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.