[fpc-pascal] default parameter single = NaN
dle3ab at angelbase.com
Mon Jun 20 22:59:26 CEST 2016
After installing fpc 3.0.0, I'm getting an...
Error: function header doesn't match the previous declaration
for a (non-method) function that does exactly match its previous
function make_scale_matrix (zx:single; zy:single=NaN):t_2d_affine;
I use "NaN" extensively to indicate a null / not specified value, so it
would really be a drag to lose this feature. Although the header exactly
matches the previous declaration, it now objects to these NaN default
Aside from the error message being misleading/inaccurate, I didn't
notice any mention of this in the user changes document; nor is this
prohibition mentioned in the html documentation online,
What's the status of this?
Given this feature loss, I would have to either abandon the default
parameter feature and create many similar functions; or, pick another
value to use (when NaN is ideal).
More information about the fpc-pascal