My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Literals  
Literals
Updated Apr 14, 2011 by alexis.f...@gmail.com

Literals

Literals in Meta D++ follow C/C++/C# family of languages:

Numbers

// unsigned integers
int a = 1233432444;
// octal
a = 0888;
// hex
a = 0xFFFF;

long b = 1233213324l;
b = 12L;

// floating point
float v1 = 45.6f;
double v2 = 12.332333;

v2 = 12E+120;
v2 = 12E-120;

Strings and char

string^ mystr = "Hello world\n\n\"Earth\"";
char a = 'e';
a = '\"';

Booleans

bool flag = true;
flag = false;

Null

// use null or NULL
string^ var = null;
int* var2 = NULL;

Sign in to add a comment
Powered by Google Project Hosting