Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Language Reference

table of contents

Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinga local clone.

Portability

Contents
  1. 32 to 64 Bit Portability
  2. Endianness
  3. OS Specific Code

It's good software engineering practice to minimize gratuitous portability problems in the code. Techniques to minimize potential portability problems are:

32 to 64 Bit Portability

32 bit processors and operating systems are still out there. With that in mind:

Endianness

Endianness refers to the order in which multibyte types are stored. The two main orders arebig endian andlittle endian. The compiler predefines the version identifierBigEndian orLittleEndian depending on the order of the target system. The x86 systems are all little endian.

The times when endianness matters are:

OS Specific Code

System specific code is handled by isolating the differences into separate modules. At compile time, the correct system specific module is imported.

Minor differences can be handled by constant defined in a system specific import, and then using that constant in anIfStatement orStaticIfStatement.

Interfacing to Objective-C
Named Character Entities
Copyright © 1999-2025 by theD Language Foundation | Page generated byDdoc on Fri Oct 10 22:16:58 2025

[8]ページ先頭

©2009-2025 Movatter.jp