Dear friends, how can I read long lines (ie. more than 254 characters long) using Memoline() with Harbour? xHarbour's Memoline() already supports long lines but the Harbour's one not.
EMG
// IMPRIMINDO UM TEXTO COM A PRINTER.PRG
// Em: 22/09/2022 - Covid-19 - Joao Santos - kapiabafhw@gmail.com
#include "FiveWin.ch"
FUNCTION Main()
LOCAL cImptxt, cTexto, oPrn, oFont, nLin, nLinha
cImpTxt := MemoRead( "ARQ.txt" ) // Pega o texto
cTexto := ALLTRIM( cImpTxt )
PRINTER oPrn NAME "Imprimindo um TXT" PREVIEW MODAL
DEFINE FONT oFont NAME "COURIER NEW" SIZE 0, - 8 OF oPrn
oPrn:SetPage( 9 ) // A4
oPrn:SetPortrait() // Vertical
PAGE
nLin := 1
FOR nLinha = 1 TO MLCOUNT( cTexto, 100 )
SYSREFRESH()
oPrn:CmSay( nLin := nLin + .4, 1.5, MEMOLINE( cTexto, 100, nLinha ), oFont )
IF nLin > 25
nLin := 1
ENDPAGE
PAGE
ENDIF
NEXT
ENDPAGE
ENDPRINT
oFont:End()
RETURN NIL
// FIM
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 41 guests