Why am I unable to insert new line/tabs in code using TLC string?
이전 댓글 표시
I am writing a TLC file to inline an s-function when generating code. In the TLC file, I do a lot of string parsing to generate desirable code for the s-function. While doing so, I am unable to insert newlines and tabs in the generated code in a controlled manner.
The TLC file consists of the following code:
%assign output2_if_else_string = "Start_String : \t"
%assign output2_if_else_string = FEVAL ("strcat", output2_if_else_string, "My name is")
%assign output2_if_else_string = FEVAL ("strcat", output2_if_else_string, "\n")
%assign output2_if_else_string = FEVAL ("strcat", output2_if_else_string, "Anuj Gupta")
I expect the output in my generated c code to contain the following strings:
************************************************
Start_String:My name is
Anuj Gupta
************************************************
Instead the output appears as follows:
************************************************
Start_String :My name isAnuj Gupta
************************************************
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!