Search found 79 matches: atokens

Return to advanced search

Re: len an array

give me 1 instead of zero Because that is the correct answer. aLines  := HB_ATokens( "one", "|" )? aLines // -> { "one" } I not Know how I Have on String now I made aLines := hb_ATokens( cString,"|" ) if empty(aLines[1] ) alines:= {} Endif
by Silvio.Falconi
Mon May 06, 2024 11:41 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: len an array
Replies: 5
Views: 169

len an array

local cString:=""
aLines := hb_ATokens( cString,"|" )

?len(aLines)


give me 1 instead of zero

why ?
by Silvio.Falconi
Mon May 06, 2024 10:43 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: len an array
Replies: 5
Views: 169

function to create a string

Is there a function to save a string like "30/60/90" from an array?

i.e. to create an array I made aData := hb_ATokens(cString,"/")

Does the reverse function exist?
by Silvio.Falconi
Tue Dec 12, 2023 1:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: function to create a string
Replies: 6
Views: 480

Re: show a string into xbrowse

Simpler way is: oCol:cEditPicture := "###gg" run only the last element https://i.postimg.cc/jqckNKDN/kio.png sample cstring:= "30/60/90" aData := hb_ATokens(cString,"/") @ 10, 5 XBROWSE oBrw OF oDlg ; COLUMNS 1,2; HEADERS "gg","" ; C...
by Silvio.Falconi
Tue Dec 12, 2023 10:45 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: show a string into xbrowse
Replies: 4
Views: 412

Re: Como Separar lineas en Archivo TXT SOLUCIONADO

Gracias le encontre la solucion

aLines := hb_ATokens( MemoRead( xFile ), Chr(10))
For a:=1 To Len( aLines )
?aLines[a]
Next
by CARLOS ATUNCAR
Mon Sep 25, 2023 12:01 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Como Separar lineas en Archivo TXT SOLUCIONADO
Replies: 1
Views: 269

Re: lIncrFilter + MDI

No comprendo. ¿Tienes un ejemplo completo para probar? Saludos. Gracias por responder. #include 'fivewin.ch' REQUEST DBFCDX //----------------------------------------------------------------------------// function Main() local oWnd, oBar SET DATE ITALIAN SET CENTURY ON RDDSETDEFAULT( "DBFCDX&q...
by cpheraclio
Sun Jun 04, 2023 11:22 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: lIncrFilter + MDI
Replies: 4
Views: 373

Re: Extracting the lines from a text

... Language Reference 1.1 HB_ATokens( <cString> , ; [<cDelimiter>] , ; [<lSkipQuotes>] , ; [<lDoubleQuotesOnly>] ) --> aTokens <cDelimiter> A single character can be specified as delimiter used to tokenize the string <cString>. It defaults to a blank space ...
by hua
Mon Sep 26, 2022 7:00 am
 
Forum: Utilities / Utilidades
Topic: Extracting the lines from a text
Replies: 4
Views: 775

Re: Extracting the lines from a text

hi, However hb_atokens() only accepts a single character for the delimiter. So can't pass CRLF to it https://github.com/Petewg/harbour-core/wiki/hb_A#hb_atokenscstring-cdelimiterleol-lskipstrings-ldoublequoteonly--atokens ...
by Jimmy
Mon Sep 26, 2022 3:50 am
 
Forum: Utilities / Utilidades
Topic: Extracting the lines from a text
Replies: 4
Views: 775

Re: Extracting the lines from a text

Thanks for the tip of using hb_regexSplit().
However hb_atokens() only accepts a single character for the delimiter.
So can't pass CRLF to it
by hua
Thu Sep 22, 2022 6:57 am
 
Forum: Utilities / Utilidades
Topic: Extracting the lines from a text
Replies: 4
Views: 775

Re: Extracting the lines from a text

Another way:

hb_ATokens( cText, hb_Eol() )
by Antonio Linares
Thu Sep 22, 2022 6:21 am
 
Forum: Utilities / Utilidades
Topic: Extracting the lines from a text
Replies: 4
Views: 775

Re: ayuda con fastreport y page con texto de tamaño variable

Para que quede para referencias futuras... resuelto, aunque con maña, como los detail band son los unicos que son capaces de crar tantas paginas como sea necesario.... tome el texto, lo separe en párrafos con la funcion hb_atokens obtengo un arreglo unidimensional, luego lo paso a un arrego de dos d...
by carlos vargas
Thu Mar 03, 2022 9:20 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: ayuda con fastreport y page con texto de tamaño variable
Replies: 6
Views: 355

Re: Memoline long lines

I changed one of my project so that it is using hb_atokens now and it works very well, thank you!

EMG
by Enrico Maria Giordano
Tue Feb 15, 2022 8:48 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Memoline long lines
Replies: 6
Views: 543

Re: memowrit() file type DOS or UNIX

Dear Otto, You can use StrTran( cText, Chr( 13 ) + Chr( 10 ), Chr( 10 ) ) to go from Windows to Linux but to go from Linux to Windows I think you can not use StrTran() or you will go into an endless loop as it will never stop: StrTran( cText, Chr( 10 ), Chr( 13 ) + Chr( 10 ) ) So from Linux to Windo...
by Antonio Linares
Mon Feb 14, 2022 4:38 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: memowrit() file type DOS or UNIX
Replies: 6
Views: 445

Re: Memoline long lines

Dear Enrico,

MemoLine() is extremelly slow.

Better use this technique:
local aLines := hb_ATokens( MemoRead( "test.txt" ), CRLF )

lines length will not be an issue then
by Antonio Linares
Mon Feb 14, 2022 4:32 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Memoline long lines
Replies: 6
Views: 543

Re: Leer Excel XLSX grande a un array o DBF

Podrias probar pasando primero el archivo CSV a un array ya que esto lo hace bien rapido. #include "FIVEWIN.CH" FUNCTION Main() LOCAL cMsgRun := "Procedure in execution; please Wait...", cMsgArrayData := "Creating CSV array data; please wait..." LOCAL nStart := Seconds(...
by George
Sat Feb 05, 2022 4:31 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Leer Excel XLSX grande a un array o DBF
Replies: 12
Views: 1252
Next

Return to advanced search