What is the stance on partial initializers when declaring multiple variables of the same type?

Jacob Carlborg doob at me.com
Thu Jul 21 03:18:57 PDT 2011


On 2011-07-21 08:52, Andrej Mitrovic wrote:
> I ran into this simple C declaration:
>
> float float_x, float_y, float_xb, float_yb;
>
> These need to be explicitly initialized in D, otherwise you either get
> crashes or you won't get anything but a blank screen (with regards to
> rendering with OpenGL).

How about you create a new type, that can be implicitly converted to 
float and is initialized to 0.0.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list