XDCscript - Package-Body

From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 18-Nov-2017 00:11 UTC

XDCscript - Package-Body

Implementation of base package methods

A package body is a special capsule named package.xs that implements the functions specified in the xdc.IPackage interface.

 
 
 
 
 
function getLibs(prog) {
    this.$private.foo = ...;  // 'this' references the package object
    var expr = ...;
    return (expr)             // Typed-Assignment of expr to a return of a typed value
}

The preceding fragment implements a package-wide function specified for this package. The keyword this references the corresponding Package 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 18-Nov-2017 00:11 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved
Personal tools
package reference