artefaktur
software engineer &        architecture

 
 
 
 

CfgScript typealias Statements

| Expression statement | block {} Statement | Branch Statements | Loop Statements | Type Declaration | Variable Declaration | Synchronize Statements | With Statement | Using Statement | Type Alias |

Type alias introduces new name for anothother type name


Content of this chapter:

   TypeAliasStatement
   Predefined Type Alias
   Sample



 TypeAliasStatement

TypeAliasStatement
: 'typealias' TypeName TypeName ';'
;
typealias introduce a new name for an existent type.
The new type name is valid in the current and child scopes.

 Predefined Type Alias

Following type alias are predefined (and cannot be overwritten):
  • Any is acdk.lang.dmi.DmiObject
  • Rest is acdk.lang.dmi.DmiObjectArray
  • NamedRest is acdk.lang.dmi.DmiNamedArgArray
  • Delegate is acdk.lang.dmi.DmiDelegate

 Sample


typealias acdk.lang.String mytype;

mytype s = "asdf";
{
  typealias acdk.lang.Integer mytype;
  mytype is = new Integer(42); 
}
// now is mytype a string again
s = "asdf";

See also:  Using Statement.
 
Last modified 2005-05-08 22:26 by SYSTEM By Artefaktur, Ing. Bureau Kommer