From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC

XDCscript - Instance-Body

The implementation of a module's instance methods

A capsule that implements all (inherited) module-wide and per-instance metaonly functions declared in a module's unit-specification. These capsule files are named UnitName.xs and reside in the base directory of the containing package. A special capsule named package.xs implements the (module-wide) functions specified in the xdc.IPackage interface.

 
 
 
 
function fxnName(arg ... ) { // Typed-Assignment of callee's values to this function's params
    this.$private = ...;     // 'this' references the appropriate module or instance object
    return (expr)            // Typed-Assignment of expr to a return of a typed value
}

The preceding fragment implements a module-wide or per-instance function specified for this module. The keyword this references the corresponding Module or Instance object, whose $private state is manipulated in this capsule. Typed-Assignment rules are enforced upon function entry and exit.

[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved


Views
Personal tools
package reference