class LocalList

pri next : LocalList;

pri Data : Object;

meth SetNext =^ (val n: ObjFieldList ·

next:= n;

)

end

meth GetNext =^ (res n: ObjFieldList ·

n:= next;

)

end

meth GetData =^ (res d: Object ·

d:= Data;

)

end

meth SetData =^ (val d: Object ·

Data:= d;

)

end

 

meth GetLocal =^ (val count: Int;

res d: object ·

var next: LocalList ·

if [] Count = 1 ®

self.GetData(d);

[] Count > 1 ®

self.GetNext(next);

next.GetLocal(count-1, d);

fi

end

)

end

 

meth PutLocal =^ (vres Tail: LocalList;

val count: Int;

val d: object ·

var next: LocalList ·

if [] Count = 1 ®

Tail.setData(d);

[] Count > 1 ®

Tail.GetNext(next);

next.PutLocal(next, count-1, d);

Tail.SetNext(next);

fi

end

)

end

 

meth AppendLocal =^ (vres Tail: LocalList; val d: object ·

var next: LocalList ·

Tail.GetNext(next);

If [] next <> null ®

next.AppendLocal(next, d);

[] next = null ®

next:= New LocalList;

next.SetData(d)

fi

Tail.SetNext(next);

end

)

end

end