Hello Group,
Can someone please tell me where do I change the number of decimal places for a float data type in the para. Also what is maximum you can assign. Thanks!
Lori.
float data type - change the number of decimal places
- lakefalos
- Posts:27
- Joined: Thu Feb 01, 2018 3:13 pm
float data type - change the number of decimal places
- adaneau
- Posts:310
- Joined: Tue Feb 21, 2012 9:49 am
Re: float data type - change the number of decimal places
Hi,
What's your issue here? Para is a display tool so it shows what is defined inside the common / format section of the dpe (precision is max number of digit and scale is decimal point precision.
However this doesnt impact the float itself, which follows classic float rules
https://en.cppreference.com/w/c/types/limits
The float precision is only for displaying, including para.
BR
Alexandre
What's your issue here? Para is a display tool so it shows what is defined inside the common / format section of the dpe (precision is max number of digit and scale is decimal point precision.
However this doesnt impact the float itself, which follows classic float rules
https://en.cppreference.com/w/c/types/limits
The float precision is only for displaying, including para.
BR
Alexandre
- lakefalos
- Posts:27
- Joined: Thu Feb 01, 2018 3:13 pm
Re: float data type - change the number of decimal places
Hi Alexandre,
Thanks for getting back to me so quickly. You answered part of the question - I couldn't find where the scaling and precision parameters lived. Now I know!
I dynamically populate the para so I need to know how do I write to the precision and common parameters via scripting?
Thanks for getting back to me so quickly. You answered part of the question - I couldn't find where the scaling and precision parameters lived. Now I know!
I dynamically populate the para so I need to know how do I write to the precision and common parameters via scripting?
- adaneau
- Posts:310
- Joined: Tue Feb 21, 2012 9:49 am
Re: float data type - change the number of decimal places
Hi Lori,
Just use dpSetFormat
Br
Alex
Just use dpSetFormat
Br
Alex
- lakefalos
- Posts:27
- Joined: Thu Feb 01, 2018 3:13 pm
Re: float data type - change the number of decimal places
ah..of course.
Thanks