PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/sheetN referenceC hash_tablerefersizeOIxNbothI sNM.sheet.S.appendCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.sheet.S.appendRICdateOIx7KNappendnCstringOIx Append an attribute. If the sheet already has an attribute with the same name, the value of the existing attribute is replaced by the value of the argument attribute. See also ->value. Note that `attribute <-convert' convert an attribute name into an attribute object with value @nil.CchainsizeOIxIENM.sheet.S.valueXnnnnsNC.sheetCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOIxNC.sheetRIOIx,|NsheetnOI xCA sheet object is a list of name/value pairs. Sheets are similar to records in Pascal, structures in C or frames in knowledge representation formalisms. Unlike records and structures however, sheets can be given new attributes and attributes can be deleted dynamically.. Sheets are generally used to create a single handle to a number of objects. In previous versions of PCE they where also commonly used to represent application data. The current version allows for user-defined classes, which form a much more efficient implementation of name/value pairs than sheets. Note also that adding an attribute to an object using `Object ->attribute' is often a good alternative for using sheets. Finally, if the collection of attribute is large and lookup is more often than changing the data, class hash_table should be considered.OI xIeN$class/hash_table$C.hash_tableeN"$class/object$M.object.S.attributeeN $topics$97EN $topics$96XnnnsNM.sheet.S.catch_allOI xNM.sheet.S.catch_allRIOI x,|N catch_allnOI xThe methods <->catch_all are called by PCE's message-passing system if there is no other definition for a method. Class sheet uses these methods to store and fetch attributes: ?- new(@s, sheet(name, age, address)), send(@s, name, gnu). ?- get(@s, name, X). X = gnu This approach has, besides its definite charm, one drawbacks: Attributes whose name collide with a method name cannot be accessed this way. Code that handles unknown attribute names should use <->value to avoid this problem.nnnnnsNM.sheet.S.initialiseOIxNM.sheet.S.initialiseRIOIx,|-N initialisenOIxrCreate a sheet from a list of attributes: ?- new(Sheet, sheet(attribute(name, gnu), attribute(age, 100))).nnnnnsNM.sheet.G.catch_allOIxNM.sheet.G.catch_allRIOIx,|N catch_allnnnOIxIENM.sheet.S.catch_allXnnnsNM.sheet.S.for_allOIxNM.sheet.S.for_allRIOIx,|Nfor_allnOIx?Run code on all <-members. Arguments: @arg1 attribute objectnnnnnsNM.sheet.S.valueOIxNM.sheet.S.valueRIOIx(Ϗ'NvaluenOIxAssociate `name' with `object'. If the sheet already has an attribute with this name, the value of the attribute is changed. Otherwise a new attribute with the given name and value is appended to the sheet.OIxIeNM.sheet.S.send_catch_allENM.sheet.S.appendXnnnnsNM.sheet.S.deleteOIxNM.sheet.S.deleteRIOIx,|NdeletenOIxRDelete attribute with the given name. Fails silently if no such attribute exists.nnnnnsNV.sheet.membersCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxNV.sheet.membersRIOIx,|jNmembersnOI xkChain object holding the attributes of the sheet. It is allowed to analyse and modify this chain directly.nnnsNM.sheet.S.for_someOI!xNM.sheet.S.for_someRIOI"x,|Nfor_somennnOI#xIENM.sheet.S.for_allXnnnsNM.sheet.G._argOI$xNM.sheet.G._argRIOI%x,| N_argnOI&xENth-1 attribute object. Used for conversion to a host-language term.nnnnnXaCnumber O I'xx