std.random
pragma
pragma_member at pathlink.com
Tue Apr 11 13:56:06 PDT 2006
In article <e1gu8s$2pnj$1 at digitaldaemon.com>, Kramer says...
>
>Forgive me for asking such a naive (I feel I should know this already) question
>and taking this off-topic, but what is the type size_t? I've seen it used (and
>also ptrdiff_t I believe), but I don't know what they're for or how to use them?
>
>-Kramer
>
>
Good question.
The names are inherited from the C/C++ conventions, and serve to separate the
rigidly defined byte-width of D types from platform/architecture definitions for
an address, buffer size or integer. Using these types, along with D's
references and pointers will ensure that the same code written under a 32-bit
platform will compile just fine under a 64-bit one and so forth (its a
portability thing).
http://www.devx.com/tips/Tip/13388
- EricAnderton at yahoo
More information about the Digitalmars-d-learn
mailing list