Translating C "static arrays" into D?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Feb 26 18:02:49 UTC 2018


On Mon, Feb 26, 2018 at 09:54:12AM -0800, H. S. Teoh via Digitalmars-d wrote:
> What's the correct translation of the following C declarations into D?
> 
> 	typedef double[1] mytype;

Sorry, typo, should be:

 	typedef double mytype[1];


> 	void someFunc(mytype x, mytype *y, mytype **z);
> 
> 	struct SomeStruct {
> 		mytype x;
> 		mytype *y;
> 		mytype **z;
> 	}
[...]


T

-- 
Real men don't take backups. They put their source on a public
FTP-server and let the world mirror it. -- Linus Torvalds


More information about the Digitalmars-d mailing list