Ask our Experts
Didn't find what you are looking for? Ask our experts!
New Community Ranking System
Our Community ranking system has recently been updated. You may notice changes in user rankings and receive system messages or notifications. If you have questions about how the new ranking works, please refer to the announcement post for more details (click here).
Support Forum for HVAC and pumping machines, Modicon M17x and EcoStruxure Machine Expert HVAC software for chillers, AHU, CRAC units for datacenters or process chillers applications - from design, implementation to troubleshooting and more, by Schneider Electric.
Search in
Please select a country to continue with beta search.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-07-28 08:22 PM
Hi,
Using the SIZEOF function on a STRING pointer doesn't return the size of the STRING variable, see below.
I am expecting that 'udiStringSize_pointer' would return 6. Note that sStringAlloc5 is of type 'STRING[ 5 ]' while pString is '@STRING'. Is this expected behaviour?
This on EcoStruxure Machine Expert HVAC v1.10.0 on Windows 11 Enterprise 10.0.26200, and on a PLC with BIOS 668.17
Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-08-04 12:31 AM
Hello,
it returns 1 because SIZEOF(@ptrString) is calculated during compilation, so it is not always possible to know in advance the size of the string it is pointing to.
Margherita
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-07-30 12:52 AM
Hello,
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-07-31 12:16 AM
Hi Margherita,
Thanks for getting back to me.
I'm not after the length of the string; only after the size of memory allocated to it.
In your example, on line 9, I want the value of 33 - the same as what is returned on line 3. Why is the value of '1' correct in this case?
Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-08-04 12:31 AM
Hello,
it returns 1 because SIZEOF(@ptrString) is calculated during compilation, so it is not always possible to know in advance the size of the string it is pointing to.
Margherita
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.