Why am I unable to insert new line/tabs in code using TLC string?
Afficher commentaires plus anciens
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
************************************************
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!