手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
人工智能
栏目导航
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
子栏目导航
php实例代码
Javascript实例代码
python实例代码
Shell实例代码
Sql实例代码
正则表达式实例代码
Python函数
Java实例代码
C#实例代码
C语言实例代码
C++实例代码
Erlang实例代码
Dart实例代码
D3.js实例代码
D语言实例代码
CSS实例代码
Cobol实例代码
Clojure实例代码
Bootstrap实例代码
Vue实例代码
Angular实例代码
汇编语言实例
编程之家
D语言实例代码
D语言Hello World程序
// ------------------- import std.stdio; void main(string[] args) { writeln("Hello World!");
作者:编程之家 时间:2022-07-04
D语言While循环
import std.stdio; int main () { /* local variable definition */ int a = 10; /* while loop execution */
作者:编程之家 时间:2022-07-04
D语言运算符优先级
import std.stdio; int main(string[] args) { int a = 20; int b = 10; int c = 15; int d = 5; int e; e = (a + b) * c / d;// ( 30 * 15 ) / 5
作者:编程之家 时间:2022-07-04
D语言sizeof运算符
import std.stdio; int main(string[] args) { int a = 4; short b; double c; int* ptr; /* example of sizeof operator */
作者:编程之家 时间:2022-07-04
D语言赋值运算符
import std.stdio; int main(string[] args) { int a = 21; int c ; c =a; writefln("Line 1 - =Operator Example, Value of c = %d\\n", c );
作者:编程之家 时间:2022-07-04
D语言按位运算符
import std.stdio; int main(string[] args) { uint a = 60; /* 60 = 0011 1100 */ uint b = 13; /* 13 = 0000 1101 */
作者:编程之家 时间:2022-07-04
D语言逻辑运算符
import std.stdio; int main(string[] args) { int a = 5; int b = 20; int c ; if ( a && b ) { writefln("Line 1 - Condition is true\\n" );
作者:编程之家 时间:2022-07-04
D语言关系运算符
import std.stdio; int main(string[] args) { int a = 21; int b = 10; int c ; if( a == b ) { writefln("Line 1 - a is equal to b\\n" );
作者:编程之家 时间:2022-07-04
D语言算术运算符
import std.stdio; int main(string[] args) { int a = 21; int b = 10; int c ; c = a + b; writefln("Line 1 - Value of c is %d\\n", c );
作者:编程之家 时间:2022-07-04
D语言转义序列
import std.stdio; int main(string[] args) { writefln("Hello\\tWorld%c\\n",'\\x21');
作者:编程之家 时间:2022-07-04
D语言更多功能特性
import std.stdio; enum { A = 1.2f,// A is 1.2f of type float B,// B is 2.2f of type float int C = 3, // C is 3 of type int
作者:编程之家 时间:2022-07-04
D语言基本类型语法
import std.stdio; enum : string { A = "hello", B = "world", } int main(string[] args) {
作者:编程之家 时间:2022-07-04
D语言匿名枚举
import std.stdio; // Initialized sun with value 1 enum { sun , mon, tue, wed, thu, fri, sat }; int main(string[] args) {
作者:编程之家 时间:2022-07-04
D语言命名枚举
import std.stdio; // Initialized sun with value 1 enum Days { sun = 1, mon, tue, wed, thu, fri, sat };
作者:编程之家 时间:2022-07-04
D语言枚举
import std.stdio; enum Days { sun, mon, tue, wed, thu, fri, sat }; int main(string[] args) { Days day; day = Days.mon;
作者:编程之家 时间:2022-07-04
D语言字符类型
import std.stdio; int main() { writeln("Length in bytes: ", char.sizeof); return 0; }
作者:编程之家 时间:2022-07-04
D语言浮点类型
import std.stdio; int main() { writeln("Length in bytes: ", float.sizeof); return 0; }
作者:编程之家 时间:2022-07-04
D语言整数类型
// --------------------- import std.stdio; int main() { writeln("Length in bytes: ", ulong.sizeof);
作者:编程之家 时间:2022-07-04
D语言变量声明
import std.stdio; int a = 10, b = 10; int c; float f; int main () { writeln("Value of a is : ", a);
作者:编程之家 时间:2022-07-04
D语言字符数组
import std.stdio; void main(string[] args) { char[9] greeting1 = "Hello all"; writefln("%s",greeting1);
作者:编程之家 时间:2022-07-04
D语言字符
import std.stdio; import std.uni; void main() { writeln("Is ğ lowercase? ", isLower('ğ'));
作者:编程之家 时间:2022-07-04
D语言property函数
import std.stdio; struct Rectangle { double width; double height; double area() const @property { return width*height;
作者:编程之家 时间:2022-07-04
D语言inout函数
import std.stdio; inout(char)[] qoutedWord(inout(char)[] phrase) { return '"' ~ phrase ~ '"';
作者:编程之家 时间:2022-07-04
D语言可变参数函数
import std.stdio; import core.vararg; void printargs(int x, ...) { for (int i = 0; i < _arguments.length; i++) {
作者:编程之家 时间:2022-07-04
D语言auto函数
import std.stdio; auto add(int first, double second) { double result = first + second; return result;
作者:编程之家 时间:2022-07-04
D语言ref函数
import std.stdio; ref int greater(ref int first, ref int second) { return (first > second) ? first : second;
作者:编程之家 时间:2022-07-04
D语言纯函数
import std.stdio; int x = 10; immutable int y = 30; const int* p; pure int purefunc(int i,const char* q,immutable int* s) {
作者:编程之家 时间:2022-07-04
D语言嵌套的switch语句
import std.stdio; int main () { /* local variable definition */ int a = 100; int b = 200; switch(a) { case 100:
作者:编程之家 时间:2022-07-04
D语言switch语句
import std.stdio; int main () { /* local variable definition */ char grade = 'B'; switch(grade) {
作者:编程之家 时间:2022-07-04
D语言嵌套If语句
import std.stdio; int main () { /* local variable definition */ int a = 100; int b = 200; /* check the boolean condition */
作者:编程之家 时间:2022-07-04
上一页
1
2
3
4
5
下一页
小编推荐
热门标签
更多
python
JavaScript
java
HTML
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot
react-native