artefaktur
software engineer &        architecture

 
 
 
 

CfgScript Basic Types

| Any Type | Basic Types | Object Types | Array Types | Enum Type | Props Type |

Basic types are the common atomar value types.


Content of this chapter:

   Basic Types
   Basic Types are Objects
   Literals



 Basic Types

BasicType
: 'bool'
| 'char'
| 'byte'
| 'short'
| 'int'
| 'jlong'
| 'float'
| 'double'
;

Sample:

// declaration and initialization of an int variable:
int i = 42;
bool b = true;


 Basic Types are Objects


Different to native C++-code the basic types are handled in CfgScript as objects too. ACDK uses the class  acdk::lang::dmi::DmiObject to manage basic types.


int i = 42;
i.toString().length() == 2;

Different to other Object types, basic types are passed by value, not by reference like normal objects.

 Literals

Literal of basic types can also be used as objects:

42.toString().length() == 2;
"AB".length() == 2;

 
Last modified 2005-05-08 22:25 by SYSTEM By Artefaktur, Ing. Bureau Kommer