43 |
/* A variable's dictionary entry. */ |
/* A variable's dictionary entry. */ |
44 |
struct variable |
struct variable |
45 |
{ |
{ |
46 |
/* Basic information. */ |
/* Dictionary information. */ |
47 |
char name[LONG_NAME_LEN + 1]; /* Variable name. Mixed case. */ |
char name[LONG_NAME_LEN + 1]; /* Variable name. Mixed case. */ |
48 |
enum var_type type; /* NUMERIC or ALPHA. */ |
enum var_type type; /* NUMERIC or ALPHA. */ |
49 |
int width; /* Size of string variables in chars. */ |
int width; /* Size of string variables in chars. */ |
|
int fv, nv; /* Index into `value's, number of values. */ |
|
|
unsigned init : 1; /* 1=VFM must init and possibly reinit. */ |
|
|
unsigned reinit : 1; /* Cases are: 1=reinitialized; 0=left. */ |
|
|
|
|
|
/* Data for use by containing dictionary. */ |
|
|
int index; /* Dictionary index. */ |
|
|
|
|
|
/* Missing values. */ |
|
50 |
struct missing_values miss; /* Missing values. */ |
struct missing_values miss; /* Missing values. */ |
|
|
|
|
/* Display formats. */ |
|
51 |
struct fmt_spec print; /* Default format for PRINT. */ |
struct fmt_spec print; /* Default format for PRINT. */ |
52 |
struct fmt_spec write; /* Default format for WRITE. */ |
struct fmt_spec write; /* Default format for WRITE. */ |
|
|
|
|
/* Labels. */ |
|
53 |
struct val_labs *val_labs; /* Value labels. */ |
struct val_labs *val_labs; /* Value labels. */ |
54 |
char *label; /* Variable label. */ |
char *label; /* Variable label. */ |
55 |
|
enum measure measure; /* Nominal, ordinal, or continuous. */ |
56 |
|
int display_width; /* Width of data editor column. */ |
57 |
|
enum alignment alignment; /* Alignment of data in GUI. */ |
58 |
|
|
59 |
|
/* Case information. */ |
60 |
|
int fv, nv; /* Index into `value's, number of values. */ |
61 |
|
bool init; /* True if needs init and possibly reinit. */ |
62 |
|
bool reinit; /* True: reinitialize; false: leave. */ |
63 |
|
|
64 |
/* GUI display parameters. */ |
/* Data for use by containing dictionary. */ |
65 |
enum measure measure; /* Nominal ordinal or continuous */ |
int index; /* Dictionary index. */ |
|
int display_width; /* Width of data editor column */ |
|
|
enum alignment alignment; /* Alignment of data in gui */ |
|
66 |
|
|
67 |
/* Short name, used only for system and portable file input |
/* Short name, used only for system and portable file input |
68 |
and output. Upper case only. There is no index for short |
and output. Upper case only. There is no index for short |
71 |
string. */ |
string. */ |
72 |
char short_name[SHORT_NAME_LEN + 1]; |
char short_name[SHORT_NAME_LEN + 1]; |
73 |
|
|
74 |
/* Per-command info. */ |
/* Each command may use these fields as needed. */ |
75 |
void *aux; |
void *aux; |
76 |
void (*aux_dtor) (struct variable *); |
void (*aux_dtor) (struct variable *); |
77 |
}; |
}; |