davidl wrote:

I mean the first behavior can cause problems.

Ohh sorry.

I doubt any coder would try to get that result by writing that piece of code. I ported some C# source to D, and I got this semantic different issue.


It is probably mostly used for dealing with binary data but D has no other way of specifying a number that is only 1 byte except the char but that would be a misuse of the type system unless ported from c/c++. Just a few gotchas off the top of my head:

D     C#
------------
ubyte   Byte
byte    SByte
wchar   Char

Reply via email to