TEXT/ENDTEXT doesn't evaluate PARAMETERS
Closed this issue · 3 comments
Irwin1985 commented
Describe the bug
When using TEXT TO with TEXTMERGE doen't evaluate parameters names.
To Reproduce
Steps to reproduce the behavior:
- Create a method/procedure/function and receive one or more parameters
- Create a string variable and fill it with TEXT TO lcStringVarName NOSHOW TEXTMERGE
- Inside the TEXT/ENDTEXT evaluate the parameters with <>
- See error
Expected behavior
The evaluated result should include the parameters values.
Desktop (please complete the following information):
- OS: Windows
- Browser Chrome
- Version 10
RobertvanderHulst commented
cpyrgas commented
Works OK now, but there's always a new line marker at the end of the created text, even if the TEXT is specified in a single line, as in the sample code:
METHOD SomeMethod(tcFileName1 AS STRING, tcFileName2 AS STRING) AS VOID
LOCAL lcOutput := "" AS STRING
TEXT TO lcOutput NOSHOW TEXTMERGE
COPY FILE "<<tcFileName1>>" TO "<<tcFileName2>>"
ENDTEXT
END METHOD
Irwin, is this the correct behavior, or should CR/LF be added only on multi line texts?
Irwin1985 commented
In this case is ok but when is used with the PRETEXT flag then it changes the behaviour. For example PRETEXT 7 eliminates all white spaces including TAB, CR, LF. More info here