いちいち変数のアドレスを積むのはいいとして、型だとか長さだとか解析するのが面倒だなあと思いつつ(;´Д`)昨日のプログラムを眺めていたら…
GETVALUE(char *value, const char *varname) {
cob_module *module = cob_current_module;
cob_field *f = module->cob_procedure_parameters[0];
printf("%08x %08x\n", value, f->data);
}
/* field attributes */typedef struct {
unsigned char type;
unsigned char digits;
signed char scale;
unsigned char flags;
const char *pic;
} cob_field_attr;/* field structure */
typedef struct {
size_t size;
unsigned char *data;
cob_field_attr *attr;
} cob_field;