/* Copyright (c) 1979 Regents of the University of California */
* pi - Pascal interpreter code translator
* Charles Haley, Bill Joy UCB
* Version 1.2 January 1979
* Declare variables of a var part. DPOFF1 is
* the local variable storage for all prog/proc/func
* modules aside from the block mark. The total size
* of all the local variables is entered into the
error("All variables must be declared in one var part");
sizes
[cbn
].om_max
= sizes
[cbn
].om_off
= -DPOFF1
;
int vline
, *vidl
, *vtype
;
for (vl
= vidl
; vl
!= NIL
; vl
= vl
[2])
enter(defnl(vl
[1], VAR
, np
, 0));
send(REVVAR
, vline
, vidl
, vtype
);
w
= (lwidth(np
) + 1) &~ 1;
for (; vidl
!= NIL
; vidl
= vidl
[2]) {
enter(defnl(vidl
[1], VAR
, np
, o2
));
sizes
[cbn
].om_max
= sizes
[cbn
].om_off
;
* Find the width of a type in bytes.
if (p
->type
== nl
+TDOUBLE
)
return (bytes(p
->range
[0], p
->range
[1]));
return ( (set
.uprbp
>>3) + 1);
w
.pint2
= p
->value
[NL_OFFS
];
* Return the width of an element
* of a n time subscripted np.
* Arrays of anything but characters are word aligned.
* Skip the first n subscripts
* Sum across remaining subscripts.
if (p
->class != RANGE
&& p
->class != SCAL
)
d
= p
->range
[1] - p
->range
[0] + 1;
* Find the lower bound of a set, and also its size in bits.
if (p
->class != RANGE
&& p
->class != SCAL
)
/* set.(upperbound prime) = number of bits - 1; */
* Return the number of bytes required to hold an arithmetic quantity
if (lb
< -32768 || ub
> 32767)
else if (lb
< -128 || ub
> 127)
if (!hp21mx
&& (lb
< -32768 || ub
> 32767))
if (lb
< -128 || ub
> 127)