您好,欢迎光临本网站![请登录][注册会员]  
文件名称: D语言编程参考手册1.0
  所属分类: C
  开发工具:
  文件大小: 1mb
  下载次数: 0
  上传时间: 2009-05-12
  提 供 者: shand******
 详细说明: D语言编程 目录 版权声明.............................................................................................................................................2 前 言....................................................................................................... ............................................3 感 谢...................................................................................................................................................3 作者简介.............................................................................................................................................3 第一篇 综 述.....................................................................................................................................1 第 1 章 D 编程语言 1.0....................................................................................................................1 第 2 章 概述......................................................................................................................................5 2.1 D是什么?...............................................................................................................................5 2.2 为什么是D?............................................................................................................................5 2.3 D 的主要功能............................................................................................................................8 2.4 D程序样例 (sieve.d)..............................................................................................................16 第 3 章 Win32平台下的D..............................................................................................................17 3.1 调用协定(Calling Conventions)..............................................................................................17 3.2 Windows 可执行文件.............................................................................................................17 第 4 章 在 D 中编写 Win32 DLL..................................................................................................19 4.1 带 C 接口的 DLL..................................................................................................................19 4.2 COM 编程...............................................................................................................................21 4.3 D 代码调用 DLL 中的 D 代码.............................................................................................22 第 5 章 在 Windows 平台调试 D..................................................................................................29 第 6 章 将 C 的 .h 文件转换成 D 模块........................................................................................31 6.1 预处理....................................................................................................................................31 6.2 连接属性................................................................................................................................31 6.3 类型........................................................................................................................................31 6.4 NULL......................................................................................................................................32 6.5 数字字法................................................................................................................................32 6.6 字符串字法.............................................................................................................................32 6.7 宏............................................................................................................................................32 6.8 声明列表................................................................................................................................33 6.9 Void 参数列表........................................................................................................................34 6.10 Const 类型修饰.....................................................................................................................34 6.11 外部全局 C 变量..................................................................................................................34 6.12 Typedef(类型定义)..........................................................................................................35 6.13 结构......................................................................................................................................35 6.14 结构成员对齐.......................................................................................................................35 6.15 嵌套结构...............................................................................................................................35 6.16 __cdecl, __pascal, __stdcall...................................................................................................36 6.17 __declspec(dllimport)............................................................................................................37 6.18 __fastcall...............................................................................................................................37 第 7 章 D 样式................................................................................................................................39 7.1 空白符(White Space)..............................................................................................................39 7.2 注释(Comments).....................................................................................................................39 1 7.3 命名协定(Naming Conventions).............................................................................................40 7.4 无意义的类型别名.................................................................................................................40 7.5 声明风格................................................................................................................................41 7.6 操作符重载.............................................................................................................................41 7.7 匈牙利命名法.........................................................................................................................41 7.8 文档........................................................................................................................................41 7.9 单元测试(Unit Tests)..............................................................................................................41 第 8 章 嵌入式文档.........................................................................................................................43 8.1 规范(Specification).................................................................................................................43 8.2 高亮(Highlighting)..................................................................................................................49 8.3 宏............................................................................................................................................50 8.4 将 Ddoc 用于其它的文档......................................................................................................55 8.5 参考........................................................................................................................................55 第 9 章 基本原理.............................................................................................................................57 9.1 操作符重载.............................................................................................................................57 9.2 特性........................................................................................................................................58 9.3 为什么使用 static if(0) 而不用 if (0)呢?............................................................................59 第 10 章 警告..................................................................................................................................61 10.1 警告——将类型为 type 的表达式 expr 隐式转换到类型 type 可能引起数据丢失......61 10.2 警告——数组的“length”隐藏了在外层作用域里的“length”名字................................62 10.3 警告——在函数最后没有返回...........................................................................................62 10.4 警告——switch 语句没有 default.......................................................................................64 10.5 警告——语句不可到达.......................................................................................................65 第二篇 高级技术..............................................................................................................................66 第 11 章 内存管理...........................................................................................................................67 11.1 字符串(和数组)的写时复制...........................................................................................67 11.2 实时......................................................................................................................................68 11.3 平滑操作...............................................................................................................................68 11.4 自由链表...............................................................................................................................69 11.5 引用计数...............................................................................................................................70 11.6 显式类实例分配...................................................................................................................70 11.7 标记/释放..............................................................................................................................71 11.8 RAII (资源获得即初始化)....................................................................................................72 11.9 在堆栈上分配类实例...........................................................................................................72 11.10 在堆栈上分配未初始化的数组.........................................................................................73 11.11 中断服务例程.....................................................................................................................74 第 12 章 异常安全编程...................................................................................................................75 12.1 示例一..................................................................................................................................75 12.2 示例二..................................................................................................................................76 12.3 示例三..................................................................................................................................78 12.4 示例四..................................................................................................................................79 12.5 示例五..................................................................................................................................80 12.6 什么时候使用 RAII、try-catch-finally 和 Scope..............................................................81 12.7 致谢......................................................................................................................................81 2 12.8 参考......................................................................................................................................81 第 13 章 再谈模板...........................................................................................................................83 13.1 摘要......................................................................................................................................83 13.2 相似性..................................................................................................................................83 13.3 实参语法...............................................................................................................................83 13.4 模板定义语法.......................................................................................................................84 13.5 模板声明、定义和导出.......................................................................................................85 13.6 模板参数...............................................................................................................................85 13.7 特例化(Specialization)..........................................................................................................86 13.8 两级名字查询.......................................................................................................................87 13.9 模板递归...............................................................................................................................88 13.10 SFINAE (Substitution Failure Is Not An Error - 置换失败不是错误)...............................89 13.11 带浮点的模板元编程.........................................................................................................90 13.12 带字符串的模板元编程.....................................................................................................91 13.13 正则表达式编译器.............................................................................................................92 13.14 更多模板元编程...............................................................................................................101 13.15 参考..................................................................................................................................102 13.16 致谢..................................................................................................................................102 第 14 章 元组(Tuples)....................................................................................................................103 第 15 章 C 语言接口.....................................................................................................................109 15.1 调用 C 函数........................................................................................................................109 15.2 存储分配.............................................................................................................................110 15.3 数据类型兼容性.................................................................................................................110 15.4 调用 printf().......................................................................................................................111 15.5 结构和联合.........................................................................................................................112 第 16 章 C++ 语言接口.................................................................................................................113 第 17 章 移植性指南.....................................................................................................................115 17.1 32 位平台向 64 平台移植.................................................................................................115 17.2 Endianness..........................................................................................................................115 17.3 OS特有的代码...................................................................................................................116 第 18 章 HTML中嵌入D ............................................................................................................117 第 19 章 D 应用程序接口.............................................................................................................119 19.1 C ABI..................................................................................................................................119 19.2 基本类型.............................................................................................................................119 19.3 结构....................................................................................................................................119 19.4 类........................................................................................................................................119 19.5 接口....................................................................................................................................120 19.6 数组....................................................................................................................................120 19.7 关联数组(Associative Arrays)............................................................................................120 19.8 引用类型(Reference Types)................................................................................................120 19.9 名字碎解(Name Mangling).................................................................................................121 19.10 类型碎解(Type Mangling)................................................................................................123 19.11 函数调用协定...................................................................................................................126 19.12 异常处理(Exception Handling).........................................................................................128 3 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: D语言编程
 输入关键字,在本站1000多万海量源码库中尽情搜索: