Difference between revisions of "XCSG:Parameter"

From AtlasWiki
Jump to: navigation, search
(Specifications: remove relationship to TemplateParameter)
Line 13: Line 13:
 
|-
 
|-
 
! Extends
 
! Extends
| [[Variable]], [[TemplateParameter]]
+
| [[Variable]]
 
|-
 
|-
 
! Description
 
! Description
Line 32: Line 32:
 
| The kind of parameter (in, out, inout, return)
 
| The kind of parameter (in, out, inout, return)
 
|}
 
|}
 
  
 
== Language Mappings ==
 
== Language Mappings ==

Revision as of 18:32, 16 April 2014

The semantics of Parameter include those common to UML [5, p. 2-51, 2-69], MS-IL, and the JVM.

The defaultValue of a Parameter must be compatible with its type.

When default parameter values are overridden, the default parameter value associated with a call should always be determined by the run time type of the target object.


Specifications

Metaclass Parameter
Extends Variable
Description An unbound variable used in the specification of an operation, a message, an event, a template, etc.
References [5, p. 2-14, Figure 2-5], [5, p. 2-51, 2-69], [26, CodeParameterDeclarationExpression]
Attribute kind
Type ParameterDirectionKind
Description The kind of parameter (in, out, inout, return)

Language Mappings

The kind property is related to the use of keywords such as const (in C++), final (in Java), or in, out and inout (in Ada), which restrict read/write access to individual parameters. C++ does not handle overridden default parameter values correctly, as explained by Scott Meyers [47, Item 38].

See Also