trong kinh nghiệm thực tế thực hiện các trình biên dịch ". - Michael "vĩ đại, chỉ là những gì tôi cần khác D trong lập trình." - segfault Lớp thừa kế thừa bất kỳ cấp phát từ lớp cơ sở của họ, nếu không quy định. Class sơ thẩm phân bổ rõ ràng. Class sơ thẩm phân bổ rõ ràng. | The D Programming Language Asm Statement Inline assembler is supported with the asm statement AsmStatement asm asm AsmInstructionList AsmInstructionList AsmInstruction AsmInstruction AsmInstructionList An asm statement enables the direct use of assembly language instructions. This makes it easy to obtain direct access to special CPU features without resorting to an external assembler. The D compiler will take care of the function calling conventions stack setup etc. The format of the instructions is of course highly dependent on the native instruction set of the target CPU and so is implementation defined. But the format will follow the following conventions It must use the same tokens as the D language uses. The comment form must match the D language comments. Asm instructions are terminated by a not by an end of line. These rules exist to ensure that D source code can be tokenized independently of syntactic or semantic analysis. For example for the Intel Pentium int x 3 asm mov EAX x load x and put it in register EAX Inline assembler can be used to access hardware directly int gethardware asm mov EAX dword ptr 0x1234 For some D implementations such as a translator from D to C an inline assembler makes no sense and need not be implemented. The version statement can be used to account for this version InlineAsm asm . else . some workaround . 70 The D Programming Language 71 The D Programming Language Arrays There are four kinds of arrays int p Pointers to data int 3 s Static arrays int a Dynamic arrays int char x Associative arrays discussed later Pointers int p These are simple pointers to data analogous to C pointers. Pointers are provided for interfacing with C and for specialized systems work. There is no length associated with it and so there is no way for the compiler or runtime to do bounds checking etc. on it. Most conventional uses for pointers can be replaced with dynamic arrays out and inout parameters and handles references . Static Arrays int 3 s These