Decimal separator in data type conversion via cast operator

Discussion about recent product features & solutions!
Search

Post Reply
2 posts • Page 1 of 1
setschel
Posts: 10
Joined: Thu Oct 14, 2021 12:50 pm

Decimal separator in data type conversion via cast operator

Post by setschel »

Hello,

we recently updated from WinCC OA V3.18 P009 to WinCC OA V3.18 P015 and noticed that when converting data type via cast operator "(string)" from float to string, comma is used as decimal separator (with project language German). In Patch P009 dot is still used as decimal separator. What is the background of this adjustment?

We are aware that via sprintf() the decimal separator is still dot.

Test with function below provides different results:
- Patch P009: "fTest = 1.23"
- Patch P015: "fTest = 1,23"

Code: Select all

main()
{
  float fTest = 1.23;
  DebugTN("fTest = " + (string)fTest);
}
Thanks in advance for feedback.

User avatar
leoknipp
Posts: 2846
Joined: Tue Aug 24, 2010 7:28 pm

Re: Decimal separator in data type conversion via cast operator

Post by leoknipp »

I have tested it but I cannot see any difference between P009 and P016 for WinCC OA 3.18.
A float is always written with a "dot" as decimal separator at the debug message.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
2 posts • Page 1 of 1