Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 1.25 KB

types.md

File metadata and controls

85 lines (61 loc) · 1.25 KB

Home

Types

Primitive types

  • int
  • long
  • double
  • string
  • mutex

Null values

There are no null values in Concert. The following table defines default values.

Type Default value
int undefined 32-bit
long undefined 64-bit
double undefined 64-bit
string Empty string ""
mutex Not applicable

Properties

Type Width in bits
int at least 32
long at least 64
double at least 64

Implicit casts

The following may be implicitly cast without a library call. Note that overflows may occur.

From type To type
int long
long int

Character Encoding

Concert string uses UTF-16 encoding.

Declaration

int declaration examples:

int x;
int y = 0;
int z = 5 + y;

long declaration examples:

long l;
long m = 0;
long n = 5 + m;

double declaration examples:

double d;
double pi = 3.14;
double tenth = 1.0 / 10.0;

string declaration examples:

string s;
string partialWelcome = "Hello";
string fullWelcome = partialWelcome + ", world!";

mutex declaration examples:

mutex m;
mutex lock;