Page 1 of 1

Posted: 15 Oct 2016, 00:19
by 23fx23
Is it possible to change during the code a param setting.

for exemple let's say there is an output parameter as a ptDataField

onGetParamInfo it's set to a 3 digit float precision using
pParamInfo->Format = "%.3f";

then let's say on the code i later say i only need an integer precision, so something that would update it back to
Format = "%.0f"; for exemple

don't think it's possible yet but just wanna be sure to avoid searching^^

Posted: 15 Oct 2016, 10:22
by oli_lab
probably not possible.

Posted: 15 Oct 2016, 14:33
by 23fx23
yes i tried a bit forcing a ongetparams but failed. anyway not big deal ..

by the way i dlike to format a float ie

1.23456 become

int 1
.x 1.2
.xx 1.23
.xx 2.235 ect

i found printf or setprecision commands in cpp usually refered to do that task but as far i i undestand it only affect a printed string representation of the float, not the float itself.

so what i do for now ie ie multiply input float by 10, round it, and then redivide by 10, or 100, 1000 ect depending whanted precision, that works but feel it's not the best way to proceed.
any ideas? Is there a cpp command to achieve this directly on the float itself?

Posted: 15 Oct 2016, 14:55
by oli_lab
I do it the way you discribed.