Characters in D
Eugene
lecom at yandex.ru
Sat Nov 2 15:44:49 UTC 2019
Hello!
In the book "Programming in D" is written:
"Variable of type char can only hold letters that are in the
ASCII table". (section 15.4 Character literals)
So why there is executed next code?
char[] cyrillics = "привет".dup;
writeln(cyrillics.idup);
Cyrillic characters are not within ASCII table. Why?;
next code is ok according on what is written in book:
char[] cyrillics = ['п', 'р', 'и', 'в', 'е', 'т']; //not compiled
More information about the Digitalmars-d
mailing list