他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.
ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.
D言語のmainはCとは違い以下のようなシグネチャです.
#include <SDKDDKVer.h> | |
#include <Windows.h> | |
#include <stdio.h> | |
#include <conio.h> | |
#include <mmsystem.h> | |
#pragma comment(lib, "winmm.lib") | |
void PrintMidiDevices() |
import os | |
type | |
TUtf16Char = distinct int16 | |
WideCString = ptr array[0.. 1_000_000, TUtf16Char] | |
const | |
utf8Encoding = 65001 | |
proc len(w: WideCString): int = |
;((-> (a b (** + a b))) 5 6) | |
( | |
(,CLOSURE ((,STOP))) | |
(,CLOSURE ( | |
(,GRAB a) | |
(,GRAB b) | |
(,CLOSURE ((,PRIMITIVE +) (,CONTINUE))) | |
(,ACCESS a) | |
(,ACCESS b))) | |
(,DEFINE +) |
/* | |
* fork.c | |
* Experimental fork() on Windows. Requires NT 6 subsystem or | |
* newer. | |
* | |
* Copyright (c) 2012 William Pitcock <[email protected]> | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any | |
* purpose with or without fee is hereby granted, provided that the above | |
* copyright notice and this permission notice appear in all copies. |
;; 配下のフォルダ全読み込み | |
(setq load-path(cons "~/.emacs.d/elisp" load-path)) | |
(setq inhibit-startup-message t) | |
(let ((dir (expand-file-name "~/.emacs.d/elisp"))) | |
(if (member dir load-path) nil | |
(setq load-path (cons dir load-path)) | |
(let ((default-directory dir)) | |
(load (expand-file-name "subdirs.el") t t t)))) | |
(require 'package) |
@see http://l-w-i.net/t/memcached/command_001.txt
$ memcached-tool localhost dump