Industry Online Support
Technical Forum
3/11/2008 6:53 PM | |
Posts: 27 Rating:
|
Hello, If I trust the Siemens topic What should you watch out for when processing strings in scripts? No.1 - Description: No memory reserved form official documentation I understand that it is no need for memory allocation when getting a char tag value into a string like this: [code] char *valTag; valTag = GetTagChar("aCharTag"); [/code] Why there is no memory allocation for the Tag? I think that this operation should be like that: [code] char *valTag; valTag = SysMalloc(dim_of_aCharTag+1); valTag = GetTagChar("aCharTag"); [/code] How is correct: with or without SysMalloc()? Thanks! |
Last edited by: Supreame at: 11.03.2008 18:54Last edited by: Supreame at: 11.03.2008 18:54 |
|
3/13/2008 9:17 AM | |
Posts: 1776 Rating:
|
Hi, when SysMalloc is necessary you can find in this FAQ http://support.automation.siemens.com/WW/view/en/26728674 |
3/17/2008 2:41 PM | |
Posts: 1776 Rating:
|
Hi, i tried this FAQ without SysMalloc and it works fine. So i think it is not necessarry. |
Follow us on