next up previous contents
Next: Appendix A: Collected Up: Shore Data Language Reference Previous: References and Relationships

 

Operations

 

    op_dcl : result_type ID '(' [ parameters ] ')' [ 'const' ]
    result_type : type_spec | 'void'
    parameters : parameter (',' parameter)*
    parameter : mode type_spec declarator
    mode : 'in' | 'out' | 'inout'

An op_dcl defines the input/output signature of an operation of an object. The actual code that implements the operation is specified in a language-dependent manner. An operation accepts zero or more values as arguments and optionally returns a value a result. The type of the result, if any, is indicated by the result_type; if the result_type is void, the operation does not return a result. A parameter mode of in indicates that the corresponding argument is not modified by the operation; otherwise, the argument must be a reference to a region of memory capable of storing a value of the indicated type, and the operation may modify the contents of that region. (The region may be, but does not have to be, part of a cached copy of an object). A parameter mode of out indicates that the effect of the operation is independent of the initial contents of the memory region supplied as an argument. The word const indicates that the operation does not change the state of the containing object.



Marvin Solomon
Fri Aug 2 13:39:38 CDT 1996