Declaration syntax

Ross Hays accounts at rosshays.net
Tue Jan 7 18:10:04 PST 2014


> 	pow : real base, real exponent -> real
> 	{
> 		// Variable declaration
> 		tmp1 : real;
>
> 		// Variable declaration with initializer
> 		result : real = dotDotDotMagic(base, exponent, tmp1);
>
> 		// Statement as usual
> 		return result;
> 	}
>
>
> T

I generally prefer the C style declarations that we already have 
in D, but that syntax is pretty nice too...



More information about the Digitalmars-d mailing list