name: anIdentifierisPool: aBooleanIf aBoolean is true, the declaration is a pool. If aBoolean is false or the attribute is omitted, the declaration is a variable. For example:pool: anIdentifierSpecifies the name of the pool in which to declare the name specified by name:, thereby making the name specified by name: a pool variable. The pool name is a Smalltalk identifier. For example:Pool variable declarations for a pool can be distributed over several declaration methods in an application namespace. The declaration methods can appear in the application or any of its subapplications. The pool declaration must be in only one declaration method or a declaration error results. An application cannot add pool variables to pools that are declared by other applications. Pool variables cannot be declared in a pool that is defined in another application namespace, even if the pool is visible or a declaration error results.A pool cannot be declared as a pool variable within another pool. A declaration that specifies pool: and isPool: true generates a syntax error.comment: aStringisPublic: aBooleanControls the visibility of the declared name. If isPublic: is omitted or aBoolean is true, the visibility of the name extends to the namespace of any application that directly or indirectly includes the application containing the declaration as a prerequisite. If aBoolean is false, the name is private and is visible only within the namespace in which it is declared. An example:isConstant: aBooleanControls whether the name can be the target of an assignment at run time. If aBoolean is true, the variable cannot be assigned to. If aBoolean is false, the variable can be assigned to. For example:If isConstant: is omitted, the value is assumed to be false. The result of using isConstant: in combination with isPool: is unspecified.
valueExpression: aStringControls the initial value of the variable declared. If valueExpression: is omitted, the initial value of the variable declared is nil. The value expression is a string that must contain either a Smalltalk literal expression or a highly restricted, context-independent initialization expression. The initialization expression types are intentionally limited. Most variables require runtime executable initialization in the form of an assignment statement (for example, in a loaded or startUp method). Some examples:Expression types for value expressions are the same as those permitted by declareConstant:value:. Those are the following types:declarations: ( <declaration>... )Makes the declaration of pool variables more concise. It can be used only in combination with the pool: attribute. An example:pragma: aStringTags a declaration with special information. The following declaration uses pragma: to add information to tag the declaration as an NLS pool and specify its catalog name.Do not use pragma: unless directed to do so by the documentation for products that extend VA Smalltalk Base. The interpretation of pragma: is not defined by VA Smalltalk.
|