Difference of TEXT INTO of Harbour vs xHarbour

Difference of TEXT INTO of Harbour vs xHarbour

Postby hua » Fri Jun 07, 2024 7:18 am

Am using FWH2404 with latest Harbour and xHarbour.
Why is the result different between Harbour and xHarbour?
Harbour produces the expected result.
Code: Select all  Expand view
 TEXT INTO h_["body"]
  Hi,
     Please provide us the Client ID and Client Secret.

  Our company info:

  Taxpayer TIN: #Tin#
  Business Registration Number: #Roc#
  Company Name: #Company#
  Company Email Address: #Email#
  ERP System Name: #System#

  --
  ENDTEXT
 


Image

Image

Another difference that I noticed, with the Harbour version occasionally it crashes with an internal error of alias not found.
It was so weird that evechart->(dbSeek(cCode), desc) generates error but ("evechart")->(dbSeek(cCode), desc) was ok.

Any insights? TIA

  Thank you
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Difference of TEXT INTO of Harbour vs xHarbour

Postby Enrico Maria Giordano » Fri Jun 07, 2024 3:28 pm

You can use this command for xHarbour:

Code: Select all  Expand view
#include "Fivewin.ch"


#command TEXT INTO <cTxt> FORMATTED => #pragma __text | <cTxt> += If( !Empty( <cTxt> ), CRLF, "" ) + %s; <cTxt> := ""


FUNCTION MAIN()

    LOCAL cTxt

    TEXT INTO cTxt FORMATTED
        Line 1
        Line 2
    ENDTEXT

    ? cTxt

    RETURN NIL
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Difference of TEXT INTO of Harbour vs xHarbour

Postby hua » Fri Jun 07, 2024 5:18 pm

Thanks Enrico. You have been a great help.
Now I can use xHarbour until I can figure out the strange behaviour with work areas in Harbour that crashes my program with an internal error.
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests