1 /* BEGIN INCLUDE FILE mrds_expressions.incl.pl1 -- jaw 2/15/79 */
 2 
 3 /* HISTORY:
 4 
 5    81-06-01 Jim Gray : removed assn len and type elements
 6    since mu_covnert is now being used.
 7 
 8 */
 9 
10 
11 dcl 1 expr aligned based (expr_ptr),                        /* internal representation of an expression,
12                                                                expression is stored in postfix polish form */
13     2 nitems fixed bin,                                     /* no. items in expression */
14     2 item (nexp_items_init refer (expr.nitems)),
15       3 type fixed bin (3) unal,                            /* 1 => data item
16                                                                2 => operator
17                                                                3 => scalar function */
18       3 op_code fixed bin (3) unal,                         /* 1 => add
19                                                                2 => subtract
20                                                                3 => multiply
21                                                                4 => divide */
22       3 data_type fixed bin (2) unal,                       /* 1 => literal
23                                                                2 => database */
24       3 reserved bit (25) unal,
25       3 desc bit (36),                                      /* data descriptor of data item or fun. result */
26       3 loc_index fixed bin (18),                           /* location index of data item or fun. result */
27       3 bit_length fixed bin (18),                          /* bit length of data item or fun. result */
28       3 assn_ptr ptr,                                       /* pointer to item storage loc. */
29       3 ai_ptr ptr,                                         /* to attr info if database item */
30       3 fn_ptr ptr;                                         /* pointer to function structure if scalar function */
31 
32 dcl  expr_ptr ptr;
33 dcl  nexp_items_init fixed bin;
34 
35 dcl 1 scalfn aligned based (sfn_ptr),                       /* internal representation of a scalar function */
36     2 entry_ptr ptr,                                        /* pointer to entry to be called */
37     2 arg_list_ptr ptr,                                     /* pointer to arg list to be used for calling function */
38     2 rslt_desc bit (36),                                   /* descriptor for result */
39     2 nargs fixed bin,                                      /* number of input args */
40     2 arg (nsf_args_init refer (scalfn.nargs)),             /* arg info */
41       3 type fixed bin (3) unal,                            /* 1 => literal
42                                                                2 => database
43                                                                3 => scalar function
44                                                                4 => expression */
45       3 must_convert bit (1) unal,                          /* on if arg must be converted to match requirements */
46       3 reserved bit (31) unal,
47       3 desc bit (36),                                      /* descriptor of data or result */
48       3 loc_index fixed bin (18),                           /* location index of data item or result */
49       3 bit_length fixed bin (18),                          /* bit length of data item or result */
50       3 assn_ptr ptr,                                       /* pointer to item storage loc. */
51       3 arg_desc bit (36),                                  /* descriptor for arg if must convert */
52       3 arg_assn_ptr ptr,                                   /* assign_ ptr for arg in must convert */
53       3 ai_ptr ptr,                                         /* to attr info if database item */
54       3 ef_ptr ptr;                                         /* pointer to expression or function structure, or null */
55 
56 dcl  sfn_ptr ptr;
57 dcl  nsf_args_init fixed bin;
58 
59 dcl ((DATA init (1)),
60     (OPERATOR init (2)),
61     (SCAL_FUN init (3)),
62     (EXPR init (4)),
63     (ADD init (1)),
64     (SUBT init (2)),
65     (MULT init (3)),
66     (DIV init (4)),
67     (LITERAL init (1)),
68     (DATABASE init (2))) fixed bin int static options (constant);
69 
70 dcl  CFLTD59 bit (36) aligned int static options (constant)
71      init ("100110000000000000000000000000111011"b);
72 dcl  RFLTD59 bit (36) aligned int static options (constant)
73      init ("100101000000000000000000000000111011"b);
74 
75 /* END INCLUDE FILE mrds_expressions.incl.pl1 */
76