float data type - change the number of decimal places

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
lakefalos
Posts:27
Joined: Thu Feb 01, 2018 3:13 pm

float data type - change the number of decimal places

Post by lakefalos »

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.

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: float data type - change the number of decimal places

Post by adaneau »

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

lakefalos
Posts:27
Joined: Thu Feb 01, 2018 3:13 pm

Re: float data type - change the number of decimal places

Post by lakefalos »

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?

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: float data type - change the number of decimal places

Post by adaneau »

Hi Lori,

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

Post by lakefalos »

ah..of course. :blush: Thanks

5 posts • Page 1 of 1