DIRECTORY IPBasic USING [Any, Integer, State, Vec, Vector, VectorShape]; IPVector: CEDAR DEFINITIONS = BEGIN OPEN IPBasic; Get: PROC[v: Vector, n: Integer] RETURNS[Any]; MakeVecLU: PROC[self: State, l, u: Integer] RETURNS[Vector]; MakeVec: PROC[self: State, n: Integer] RETURNS[Vector]; Shape: PROC[v: Vector] RETURNS[VectorShape]; GetProp: PROC[v: Vector, propName: Any] RETURNS[x: Any, b: BOOL]; GetP: PROC[v: Vector, propName: Any] RETURNS[Any]; MergeProp: PROC[v1, v2: Vector] RETURNS[Vector]; Make: PROC[self: State, shape: VectorShape] RETURNS[Vec]; VectorToVec: PROC[v: Vector] RETURNS[Vec]; NewVec: PROC[shape: VectorShape] RETURNS[Vec]; CopyVec: PROC[v: Vec] RETURNS[Vec]; RunSize: PROC[r: Vector] RETURNS[Integer]; RunGet: PROC[r: Vector, i: Integer] RETURNS[Any]; END. ¨IPVector.mesa Last edited by: Doug Wyatt, April 29, 1983 2:11 pm Get the element of v named by n. ! MasterError[BoundsFault] if n is out of range Make a vector with the lower bound l and upper bound u. Obtain the elements by popping n=u-l+1 values off the stack. ! MasterError[InvalidArgs] if n<0 or n>maxInteger ! MasterError[LimitExceeded] if n>maxVecSize ! MasterError[StackUnderflow] if fewer than n values are on the stack Make a vector with lower bound 0 and upper bound n-1. Obtain the elements by popping n values off the stack. ! MasterError[LimitExceeded] if n>maxVecSize ! MasterError[StackUnderflow] if fewer than n values are on the stack Return the shape of v. Make a Vec with lower bound shape.l and upper bound u=shape.l+shape.n-1. Obtain the elements by popping shape.n values off the stack. ! MasterError[InvalidArgs] if u>maxInteger ! MasterError[LimitExceeded] if shape.n>maxVecSize ! MasterError[StackUnderflow] if fewer than n values are on the stack Convert a Vector to a Vec. ! MasterError[LimitExceeded] if v's size exceeds maxVecSize Make a new Vec, filled with nullAnys. Make a copy of a Vec. Regard r as a run vector; return the size of the expanded vector it encodes. ! MasterError[InvalidArgs] if r has odd length or nonzero lower bound ! MasterError[WrongType] if a run length in r is not an Integer ! MasterError[LimitExceeded] if the sum of the run lengths exceeds maxInteger Regard r as a run vector; get a value from the expanded vector it encodes. ! MasterError[InvalidArgs] if r has odd length or nonzero lower bound ! MasterError[WrongType] if a run length in r is not an Integer ! MasterError[BoundsFault] if i does not name an element of the expanded vector Κ"˜headšœ ™ šœ™Jšœ"™"—J˜šΟk ˜ Jšœœ1˜>—J˜—šœ œ ˜Jšœœœ ˜J˜šΟnœœœ˜.J™ Jšœ/™/—J˜šž œœœ ˜