摘要:
//main.d : extern(C++) class A{} extern(C++) void 中间(A arg); void main(){ A a = new A(); 中间(a); } //cppShim.cpp : class A{}; extern void cppFunc(A con 阅读全文
posted @ 2021-12-13 20:05
zjh6
阅读(17)
评论(0)
推荐(0)
摘要:
Nullable!string str(T)(T setter) if (is(T == string) || is(T == Nullable!string)) { return this._str = setter; } 阅读全文
posted @ 2021-12-13 08:50
zjh6
阅读(12)
评论(0)
推荐(0)
摘要:
fun!Ybd(a,c) "映标点,映射标点.前面为(`按键 函数`,标点) let[a,b]=split(a:a) "用空格分隔 let c=a:c let k=string(c) let m='vnoremap <silent>'.a.c.' :call Gbbd("'.b.'",'.k.')< 阅读全文
posted @ 2021-12-11 16:44
zjh6
阅读(12)
评论(0)
推荐(0)
摘要:
fun! Qkst() "取可视(同)内容.先要选中.同一行行内内容. "可以再写一个可视不同行块内容.主要就是后面+之间行+前面.而行内,则之差. let [c,d]=getpos("'<")[1:2] let [e,f]=getpos("'>")[1:2] "如果跨行呢?,现在不考虑 call 阅读全文
posted @ 2021-12-11 11:29
zjh6
阅读(14)
评论(0)
推荐(0)
摘要:
string stripsemicolons(string s) { string result; // prevent reallocations result.length = s.length; result.length = 0; //append to string only when n 阅读全文
posted @ 2021-12-10 20:56
zjh6
阅读(14)
评论(0)
推荐(0)
摘要:
地址 阅读全文
posted @ 2021-12-10 14:40
zjh6
阅读(20)
评论(0)
推荐(0)
摘要:
原文 什么是"存储类"? 声明变量时说明存储内存的属性.在C中,可能是register或volatile.D中,可能是表示存储在数据节而不是(默认)的线本存储全局变量的__gshared. 为什么ref也是存储类? 它是(声明变量)参数表明未存储在该函数帧中而是存储在更高地方的属性. 为什么隐藏指针 阅读全文
posted @ 2021-12-09 20:11
zjh6
阅读(48)
评论(0)
推荐(0)
摘要:
char all[] = "all"; char *argv_def[] = { all }; if (argc == 0) { argc = 1; argv = argv_def; } //上面是C代码,下面是betterC代码 const(char)* all = "all"; const(ch 阅读全文
posted @ 2021-12-09 19:51
zjh6
阅读(17)
评论(0)
推荐(0)
摘要:
原文 B.J: 它是CPU模拟器,函数需要操作半个寄存器(CPU有16位AF寄存器,但我想操作A).我已按一对属性函数实现寄存器的"A"部分: @property ubyte a() const { return getHigh!af; } @property ubyte a(ubyte val) 阅读全文
posted @ 2021-12-09 11:13
zjh6
阅读(23)
评论(0)
推荐(0)
摘要:
import std.stdio, std.traits, core.lifetime; auto partiallyApply(alias fun,C...)(C context){ return &new class(move(context)){ C context; this(C conte 阅读全文
posted @ 2021-12-09 10:29
zjh6
阅读(23)
评论(0)
推荐(0)
浙公网安备 33010602011771号