definition files (adens _files *type file(*sequence of characters*rider record eofboolean endprocedure new(var namearray of char)fileprocedure old(var namearray of char)fileprocedure close(var ffile)procedure set(var rridervar ffileposinteger)procedure write(var rriderchchar)procedure read(var rridervar chchar)procedure writeint(var rriderninteger)procedure readint(var rridervar ninteger)end files definition represents an abstraction here we are given the two data typesfile and ridertogether with their operationsbut without further details revealing their actual representation in store of the operatorsdeclared as procedureswe see their headings only this hiding of the details of implementation is intentional the concept is called information hiding about riders we only learn that there is property called eof this flag is setif read operation reaches the end of the file the rider' position is invisibleand hence the rider' invariant cannot be falsified by direct access the invariant expresses the fact that the position always lies within the limits given by the associated sequence the invariant is established by procedure set and required and maintained by procedures read and write (also readint and writeintthe statements that implement the procedures and furtherinternal details of the data typesare sepecified in construct called module many representations of data and implementations of procedures are possible we chose the following as simple example (with fixed maximal file length)module files(adens _files *const maxlength type file pointer to record lenintegeraarray maxlength of char endrider record ( <pos < len <max length *ffileposintegereofboolean endprocedure new (namearray of char)filevar ffilebegin new( ) len : eof :false(*directory operation omitted*return end newprocedure old (namearray of char)filevar ffilebegin new( ) eof :false(*directory lookup omitted*return end oldprocedure close (var ffile)begin