Last update January 22, 2007

Doc Comments /
Cto D



Difference (last change) (no other diffs, normal page display)

Deleted: 9d8
bit// 0// 1//1 (see Note 1)

Changed: 20c19
Note 1: In theory, a bit only requires a bit. In practice, it's often more convenient to use a whole byte. I think the actual storage size for a bit depends on the circumstance. See BooleanNotEquBit for a broader discussion about bit.
Source: Data Types Example

Changed: 22,24c21
Source: DsourceTutorial:DataTypesExample

A longer list is at DigitalMars:d/type.html.
A longer list is at: DigitalMars:d/type.html.

Deleted: 28,36d24
== Examples =

== Message =
Put your comments about the official/non-official page here.

Typos:

* ".size" is now called .sizeof
* ".offset" is now called .offsetof

Deleted: 38,43d25
* "extended" is now real
* "imaginary" is now ireal
* "complex" is now creal
* "struct ABC { ... };" should be "struct ABC { ... } // note there is no terminating ;"
* "U x = { a:5 }" should be "U x = { a:5 };"
* "S x = { b:3, a:5 }" should be "S x = { b:3, a:5 };"

Changed: 45c27,28
Apparently writef now rules more than "printf" ?
== Message =
Add your comments here...

Deleted: 47d29
And the link to this page is wrong (points to the CPPtoD? page instead)!

Deleted: 49,50d30
== Amendments =
You may add a link to this page on the DocumentationAmendments page to draw extra attention to your suggestion.

Changed: 53c33
See the corresponding page in the D Specification.
Corresponding page in the D Specification

Converting C to D

More Information

in the Primitive Types, can you list the primitive's storage type (1 bit, 16 bit, 32 bit, 64 bit, 80 bit, etc etc?) -- anon

Here's some more info for integers:

D TypeMinMaxSize (bytes)
ubyte02551
ushort065,5352
uint04,294,967,2954
ulong018,446,744,073,709,551,6158
byte-1281271
short-32,76832,7672
int-2,147,483,6482,147,483,6474
long-9,223,372,036,854,775,8089,223,372,036,854,775,8078

Source: Data Types Example

A longer list is at: DigitalMars:d/type.html.

-- JustinCalvarese

Message

Add your comments here...

Links

Corresponding page in the D Specification
FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: January 22, 2007 22:33 (diff))