Search found 98 matches: strtoken

Return to advanced search

... 1) Grabar la cadena en un fichero txt con memowrit() y añadir los registro con APPEND FROM indicando el delimitador. 2) Con un bucle usando strtoken() para determinar los parámetros de inicio y fin de cada regstro y SUBSTR(). *---------------------------------------------------------------- ...
by jaba
Wed Nov 19, 2008 2:50 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Texto a Registros
Replies: 5
Views: 918

... 1) Grabar la cadena en un fichero txt con memowrit() y añadir los registro con APPEND FROM indicando el delimitador. 2) Con un bucle usando strtoken() para determinar los parámetros de inicio y fin de cada regstro y SUBSTR(). *---------------------------------------------------------------- ...
by jaba
Sat Nov 08, 2008 6:36 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Texto a Registros
Replies: 5
Views: 918

Se me ocurren dos posibles soluciones:

1) Grabar la cadena en un fichero txt con memowrit() y añadir los registro con APPEND FROM indicando el delimitador.

2) Con un bucle usando strtoken() para determinar los parámetros de inicio y fin de cada regstro y SUBSTR().
by Manuel Valdenebro
Sat Nov 08, 2008 6:30 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Texto a Registros
Replies: 5
Views: 918

... Local nPos, nArrLen, nTime xPacket := oSocket:GetData() // chr(1)|IPNum|Username|Message|Command|chr(3) xDelim := "|" i := 0 nTime := 0 if StrToken(xPacket, 1, xDelim ) = chr(1) .and. Substr(xpacket,2,1) = "|" // ok to proceed else return .f. endif // LogFile( "server.txt", { xPacket } ...
by norberto
Wed Sep 24, 2008 7:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: TCPIP Chat
Replies: 18
Views: 5429

... local cData := oSocket:GetData() local cToken LogFile( "sockserv.txt", { Len( cData ), cData } ) do case case oSocket:Cargo == ST_COMMAND cToken = StrToken( cData, 1 ) do case case cToken == "SENDFILE" oSocket:Cargo = ST_SENDFILE oSocket:hFile = fcreate( StrToken( cData, 2 ) ) case cToken == "MSG" ...
by MGA
Mon Sep 22, 2008 8:19 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Sr. Antonio ajuda com SOCKET´s!
Replies: 14
Views: 2766

Uwe, As Otto has pointed, StrToken() is highly optimized as it is entirely based in C language so its speed is excellent. Here you have a working example: #include "FiveWin.ch" function Main() local cText := "C813354668;1063567698;0160 ...
by Antonio Linares
Tue Aug 19, 2008 6:45 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: A converter from text-file ( with delimiters ) to DBF ?
Replies: 29
Views: 7431

Hi Uwe

StrToken() is probably the most flexible approach but if you are after a quick and dirty no programming type solution you could use

Code: Select all  Expand view
APPEND FROM <text-file> DELIMITED WITH ";"


Regards
xProgrammer
by xProgrammer
Mon Aug 18, 2008 9:55 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A converter from text-file ( with delimiters ) to DBF ?
Replies: 29
Views: 7431

Hello Uwe, I use STRTOKEN. Regards, Otto cToken := StrToken( cText,2,';' ) // <cText> The text from where we want to extract a token. // <nOcurrence> The numeric ocurrence of the token inside <cText>. // <cSepChar> ...
by Otto
Mon Aug 18, 2008 9:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A converter from text-file ( with delimiters ) to DBF ?
Replies: 29
Views: 7431

tsbutton+xbrowse done a google like app help

... hDC ) return nil FUNCTION weihu1701(cvar1,odb1,obrow) local ccol local array1:={} cvar1:=ALLTRIM(cvar1) cvar1:=STRTRAN(cvar1," ",",") ccol:=StrToken( cvar1, 1, "," ) AADD(array1,ccol) nfor:=1 while .t. cCol := StrToken( cvar1, nFor + 1, "," ) if EMPTY(ccol) exit end AADD(array1,ccol) nfor ...
by ShumingWang
Thu Jul 24, 2008 10:01 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: tsbutton+xbrowse done a google like app help
Replies: 1
Views: 880

... FOR I:= 1 TO MlCount( cAllEntries ) cName := MemoLine( cAllEntries,,I) cEntry := GetProfString( "Devices",cName,"") J := 2 WHILE ! EMPTY(cPort := StrToken(cEntry,J++,",")) // AADD(aDevices,TRIM(cName)) AADD(aDevices,TRIM(cName) + "," + CENTRY ) // CHIDIAK ENDDO NEXT RETURN aDevices
by Otto
Mon Jun 23, 2008 6:30 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse one dimensional array
Replies: 8
Views: 1656

... FOR I:= 1 TO MlCount( cAllEntries ) cName := MemoLine( cAllEntries,,I) cEntry := GetProfString( "Devices",cName,"") J := 2 WHILE ! EMPTY(cPort := StrToken(cEntry,J++,",")) // AADD(aDevices,TRIM(cName)) AADD(aDevices,TRIM(cName) + "," + CENTRY) // CHIDIAK ENDDO NEXT RETURN aDevices HTH Richard[code][/code]
by Richard Chidiak
Thu Jun 19, 2008 6:45 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Can not Print in Vista SP1.
Replies: 14
Views: 4317

SOCKET - HELP - resolvido : )

... local cData := oSocket:GetData() local cToken LogFile( "sockserv.txt", { Len( cData ), cData } ) do case case oSocket:Cargo == ST_COMMAND cToken = StrToken( cData, 1 ) do case case cToken == "SENDFILE" oSocket:Cargo = ST_SENDFILE oSocket:hFile = fcreate( StrToken( cData, 2 ) ) case cToken == "MSG" ...
by MGA
Thu Apr 24, 2008 2:40 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: SOCKET - HELP - resolvido : )
Replies: 1
Views: 595

SOCKET - Teclado WILBOR - RESOLVIDO

... local cData := oSocket:GetData() local cToken LogFile( "sockserv.txt", { Len( cData ), cData } ) do case case oSocket:Cargo == ST_COMMAND cToken = StrToken( cData, 1 ) do case case cToken == "SENDFILE" oSocket:Cargo = ST_SENDFILE oSocket:hFile = fcreate( StrToken( cData, 2 ) ) case cToken == "MSG" ...
by MGA
Thu Apr 24, 2008 2:33 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: SOCKET - Teclado WILBOR - RESOLVIDO
Replies: 7
Views: 1811

... oRemoteShell:=nil // En el fichero dir.txt tienes todo return nil El fichero DIR.TXT lo tratas con StrToken y separas las columnas. El fichero DIR.TXT tiene algo asi: drwxr-xr-x 14 0 0 4096 May 2 04:41 . drwxr-xr-x 14 0 0 4096 May 2 04:41 ...
by JmGarcia
Mon Apr 14, 2008 6:37 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Hora y Fecha de un fichero en FTP
Replies: 8
Views: 1607

USB en W2000 SP2

... ) If Len( cDrive ) == 1 cDrive += ":" Endif If Len( cDrive ) > 2 cDrive = SubStr( cDrive, 1, 2 ) Endif For each oJob in oJobs If cDrive == StrToken( oJob:Dependent, 2, '"' ) cDriveNumber = SubStr( StrToken( StrToken( oJob:Antecedent, 2, '"' ), 1, "," ), 7 ) return GetSerial( oSrv, cDriveNumber ...
by FiveWiDi
Wed Apr 09, 2008 7:06 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: USB en W2000 SP2
Replies: 0
Views: 468
PreviousNext

Return to advanced search