FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Difference of TEXT INTO of Harbour vs xHarbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Difference of TEXT INTO of Harbour vs xHarbour
Posted: Fri Jun 07, 2024 07: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 (fw): Select all Collapse
  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




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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Difference of TEXT INTO of Harbour vs xHarbour
Posted: Fri Jun 07, 2024 03:28 PM
You can use this command for xHarbour:
Code (fw): Select all Collapse
#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
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Difference of TEXT INTO of Harbour vs xHarbour
Posted: Fri Jun 07, 2024 05: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

Continue the discussion