X-Sharp/XSharpPublic

TEXT/ENDTEXT doesn't evaluate PARAMETERS

Closed this issue · 3 comments

Describe the bug
When using TEXT TO with TEXTMERGE doen't evaluate parameters names.

To Reproduce
Steps to reproduce the behavior:

  1. Create a method/procedure/function and receive one or more parameters
  2. Create a string variable and fill it with TEXT TO lcStringVarName NOSHOW TEXTMERGE
  3. Inside the TEXT/ENDTEXT evaluate the parameters with <>
  4. See error

Expected behavior
The evaluated result should include the parameters values.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 10

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?

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