topic
stringlengths
1
63
text
stringlengths
1
577k
ARRAY over 4096 elements
You can use a TWBrowse and calculate the correct position of the item to show for each index. For example (not tested): [code:2lx88l1k]FUNCTION GETITEM&#40; aArray, i &#41; IF i < 4096; RETURN aArray&#91; i &#93;; ENDIF RETURN aArray&#91; 4096, i - 4095 &#93;[/code:2lx88l1k] EMG
ARRAY over 4096 elements
[quote="avista":md0duoe3]I need to use array longer than 4096 elements (multidimensional if possible), and it is verry important to be used in LISTBOX. Some sugestions ?[/b][/quote:md0duoe3] Firts, Antonio is right. Second, try something like this with your code: ArPrgElem[6] = TArray():New( your length array ) @ 1,1 LISTBOX ArPrgElem[3] ; FIELDS "" ; UPDATE ; OF IdeArra4[5][NumPrg][1] ; ON LEFT DBLCLICK TeclaFWD( VK_RETURN, nFlags, IdeArra) // ArPrgElem[6] es el objeto de las array de arrays // ArPrgElem[3]:nAt = 1 ArPrgElem[3]:bLine = { || { ArPrgElem[6]:xGet(ArPrgElem[3]:nAt) } } ArPrgElem[3]:bGoTop = { || ArPrgElem[3]:nAt := 1 } ArPrgElem[3]:bGoBottom = { || ArPrgElem[3]:nAt := Eval( ArPrgElem[3]:bLogicLen ) } ArPrgElem[3]:bSkip = { | nWant, nOld | nOld := ArPrgElem[3]:nAt, ArPrgElem[3]:nAt += nWant, ; ArPrgElem[3]:nAt := Max( 1, Min( ArPrgElem[3]:nAt, ; Eval(ArPrgElem[3]:bLogicLen) ) ), ArPrgElem[3]:nAt - nOld } ArPrgElem[3]:bLogicLen = { || ArPrgElem[6]:nIndMax } ArPrgElem[3]:cAlias = "ARRAY" ArPrgElem[3]:GoTop() ArPrgElem[3]:nClrText := {|| ColorBloqueo( ArPrgElem[6]:xGet(ArPrgElem[3]:nAt) )} ArPrgElem[3]:bRClicked := { |nRow,nCol,nKeyFlags| PasaMenu(nRow, nCol, nKeyFlags, IdeArra ) } ArPrgElem[3]:nLineStyle := 0 ... The class TARRAY: ***************************************************************************** ********************** Funciones £tiles s¢lo en FiveWin ********************* ********************** 66¦ parte ******************************************** /* A tener en cuenta: -Se trata de una matriz de 4096 * 4096 elementos. -Se van a¤adiendo o borrando ROW's de 4096 a la vez y en esos casos de realiza un RESIZE() de la matriz. Se trata de un clase muy interesante a la hora de tratar array's de grandes dimensiones (superiores a 4096 elementos). */ #include "FiveWin.ch" #define CR Chr( 13 ) /* { { ::a2[ 1, 1 ], ::a2[ 1, 2 ], ..., ::a2[ 1, Len( ::a2[ 2 ] ) ] }, ; { ::a2[ 2, 1 ], ::a2[ 2, 2 ], ..., ::a2[ 2, Len( ::a2[ 2 ] ) ] }, ; ....... { ::a2[ 4096, 1 ], ::a2[ 4096, 2 ], ..., ::a2[ 4096, Len( ::a2[ 2 ] ) ] } ; } */ /* Con oArray:nIndMax = 500000 .- Para nI = 245741, se produce un "Clipper internal error": "Error no recuperable 332: Desbordamiento de la memoria para matrices/cadenas" He comprobado que funciona con oArray:nIndMax = 300000 .- */ CLASS TArray DATA a2 DATA nIndMax, nIndRow, nIndCol METHOD New( nIndMax ) CONSTRUCTOR // 0 <= nIndMax <= 4096^2 METHOD End() INLINE ::a2 := nil, ; Memory( -1 ) METHOD xSet( nInd, xValor ) METHOD xGet( nInd ) METHOD uAdd( xValor ) //incluye resizing METHOD uIns( nInd, xValor ) //incluye resizing METHOD uDel( nInd ) //incluye resizing METHOD uIncrSize() //m‚todo auxiliar METHOD uDecrSize() //m‚todo auxiliar ENDCLASS METHOD New( nIndMax ) CLASS TArray If nIndMax < 0 .or. nIndMax > 16777216 /*MsgStop( "Clase TArray()" + CR + ; "nIndMax =" + Str( nIndMax ) + CR + ; OemToAnsi( "Indice máximo fuera de rango." ),; "0 <= nIndMax <= 4096^2 (16777216)" ; )*/ MsgStop( "Clase TArray()" + CR + ; "nIndMax =" + Str( nIndMax ) + CR + ; "Indice máximo fuera de rango.", ; "0 <= nIndMax <= 4096^2 (16777216)" ; ) End ::nIndMax := nIndMax ::nIndRow := 4096 If ::nIndMax > 4096 ::nIndCol := 1 + Int( ::nIndMax / 4096 ) // ::nIndCol >= 2 Else ::nIndCol := 1 End ::a2 := Array( ::nIndRow, ::nIndCol ) Memory( -1 ) RETURN Self METHOD xSet( nInd, xValor ) CLASS TArray *No lo pongo, para no retardar... *If nInd < 1 .or. nInd > ::nIndMax * MsgStop( "Clase TArray()" + CR + ; * "::xSet( nInd, xValor )", ; * "Indice fuera de rango: nInd = " + LTrim( Str( nInd ) ) ; * ) *End ::nIndCol := Int( nInd / 4096 ) // ::nIndCol >= 0 ::nIndRow := nInd - ::nIndCol * 4096 // ::nIndRow >= 0 If ::nIndRow = 0 *( ::nIndCol > 0 ) ::nIndRow := 4096 Else ::nIndCol++ End ::a2[ ::nIndRow, ::nIndCol ] := xValor RETURN xValor METHOD xGet( nInd ) CLASS TArray *No lo pongo, para no retardar... *If nInd < 1 .or. nInd > ::nIndMax * MsgStop( "Clase TArray()" + CR + ; * "::xGet( nInd )", ; * "Indice fuera de rango: nInd = " + LTrim( Str( nInd ) ) ; * ) *End ::nIndCol := Int( nInd / 4096 ) // ::nIndCol >= 0 ::nIndRow := nInd - ::nIndCol * 4096 // ::nIndRow >= 0 If ::nIndRow = 0 *( ::nIndCol > 0 ) ::nIndRow := 4096 Else ::nIndCol++ End RETURN ::a2[ ::nIndRow, ::nIndCol ] METHOD uIncrSize() CLASS TArray local nIndCol, nI If ::nIndMax > 4096 nIndCol := 1 + Int( ::nIndMax / 4096 ) // nIndCol >= 2 Else nIndCol := 1 End ::nIndMax++ /////// ::nIndRow := 4096 If ::nIndMax > 4096 ::nIndCol := 1 + Int( ::nIndMax / 4096 ) // ::nIndCol >= 2 Else ::nIndCol := 1 End If nIndCol != ::nIndCol *Resizeado de las columnas.- For nI := 1 To 4096 aSize( ::a2[ nI ], ::nIndCol ) Next Memory( -1 ) End SysRefresh() //necesario para que funcione la pr¢xima ejecuci¢n // de funciones del tipo Msg...() RETURN nil METHOD uDecrSize() CLASS TArray local nIndCol, nI IF ::nIndMax = 1 ::nIndMax-- // ::nIndMax := 0 ::nIndRow := 4096 ::nIndCol := 1 ::a2 := Array( 4096, 1 ) Memory( -1 ) ELSE If ::nIndMax > 4096 nIndCol := 1 + Int( ::nIndMax / 4096 ) // nIndCol >= 2 Else nIndCol := 1 End ::nIndMax-- /////// ::nIndRow := 4096 If ::nIndMax > 4096 ::nIndCol := 1 + Int( ::nIndMax / 4096 ) // ::nIndCol >= 2 Else ::nIndCol := 1 End If nIndCol != ::nIndCol *Resizeado de las columnas.- For nI := 1 To 4096 aSize( ::a2[ nI ], ::nIndCol ) Next Memory( -1 ) End END SysRefresh() //necesario para que funcione la pr¢xima ejecuci¢n // de funciones del tipo Msg...() RETURN nil METHOD uAdd( xValor ) CLASS TArray ::uIncrSize() ::xSet( ::nIndMax, xValor ) RETURN nil METHOD uIns( nInd, xValor ) CLASS TArray local x local nI IF ::nIndMax = 0 ::uIncrSize() nInd := 1 //"pasamos de" lo que valga nInd ELSE If nInd > ::nIndMax MsgStop( "Clase TArray()" + CR + ; "::uIns( nInd, xValor )", ; "Indice fuera de rango: nInd = " + LTrim( Str( nInd ) ) ; ) End ::uIncrSize() *Desplazamiento hacia abajo.- For nI := ::nIndMax To nInd + 1 Step -1 x := ::xGet( nI - 1 ) ::xSet( nI, x ) Next END ::xSet( nInd, xValor ) RETURN nil METHOD uDel( nInd ) CLASS TArray local x local nI IF ::nIndMax = 0 MsgStop( "Clase TArray()" + CR + ; "Intento de borrar siendo ::nIndMax = 0",; "::uDel( " + LTrim( Str( nInd ) ) + " )" ; ) ELSE If nInd > ::nIndMax MsgStop( "Clase TArray()" + CR +; "::uDel( nInd )", ; "Indice fuera de rango: nInd = " + LTrim( Str( nInd ) ) ; ) End If ::nIndMax > 1 //de lo contrario, ::nIndMax = 1 if nInd < ::nIndMax //de lo contrario, nInd = ::nIndMax *Desplazamiento hacia arriba.- For nI := nInd To ::nIndMax - 1 x := ::xGet( nI + 1 ) ::xSet( nI, x ) Next end End *(Despreciamos el actual elemento ::nIndMax -‚simo) ::uDecrSize() END RETURN nil Regards Carlos G. Note: Que alguién le traduzca mi mal ingles.
ARRAY over 4096 elements
I solved the problem thanaks to your sugestions .... not using the classes but this working great. Best regards p.s Here is the program ============= #include "FiveWin.ch" static oWnd //----------------------------------------------------------------------------// function Main() LOCAL oDlg // Put in aSample array 40963 aSample={} for i=1 to 10 aSampleTemp = {} for j=1 to 4096 aadd(aSampleTemp,str(j)) next aadd(aSample,aSampleTemp) next aadd(aSample,{"1","2","3"}) DEFINE DIALOG oDlg FROM 0, 0 TO 500,300 PIXEL ; TITLE "Big Array" // aSample = {{"",""}} @ 35, 5 LISTBOX oList FIELDS "" UPDATE OF oDlg SIZE 130,200 PIXEL oList:nAt = 1 oList:bLine = { || { MyArrItem(aSample,oList:nAt) } } oList:bGoTop = { || oList:nAt := 1 } oList:bGoBottom = { || oList:nAt := Eval( oList:bLogicLen ) } oList:bSkip = { | nWant, nOld | nOld := oList:nAt, oList:nAt += nWant, ; oList:nAt := Max( 1, Min( oList:nAt, ; Eval(oList:bLogicLen) ) ), oList:nAt - nOld } oList:bLogicLen = { || MyArrLen(aSample) } // len(aSample) } oList:cAlias = "ARRAY" oList:GoTop() ACTIVATE DIALOG oDlg CENTERED return NIL //--------------------------------------------------// FUNCTION MyArrItem( aArray, nPozicija ) nRow = INT(nPozicija/4096) + 1 nCol = nPozicija - (nRow - 1) * 4096 IF nCol=0 nRow = nRow -1 nCol=4096 ENDIF RETURN aArray[nRow, nCol] //--------------------------------------------------// FUNCTION MyArrLen( aArray ) nLen = ( LEN(aArray) -1 ) * 4096 nLen = nLen + LEN(aArray[LEN(aArray)]) RETURN nLen
ARRAY over 4096 elements
Very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ARRAY over 4096 elements
Better sample ... If someone have better solution about sorting please reply Best regards, Pande. Program ... //---------------------------------// #include "FiveWin.ch" static oWnd //----------------------------------------------------------------------------// function Main() LOCAL oDlg LOCAL oBtn // Put in aSample array 12291 elements aSample={} for i=1 to 3 aSampleTemp = {} for j=4096 to 1 step -1 aadd(aSampleTemp,str(j)) next aadd(aSample,aSampleTemp) next aadd(aSample,{str(1),str(2),str(3)}) DEFINE DIALOG oDlg FROM 0, 0 TO 500,300 PIXEL ; TITLE "Big Array" @ 35, 5 LISTBOX oList FIELDS "" UPDATE OF oDlg SIZE 130,200 PIXEL oList:nAt = 1 oList:bLine = { || { MyArrItem(aSample,oList:nAt) } } oList:bGoTop = { || oList:nAt := 1 } oList:bGoBottom = { || oList:nAt := Eval( oList:bLogicLen ) } oList:bSkip = { | nWant, nOld | nOld := oList:nAt, oList:nAt += nWant, ; oList:nAt := Max( 1, Min( oList:nAt, ; Eval(oList:bLogicLen) ) ), oList:nAt - nOld } oList:bLogicLen = { || MyArrLen(aSample) } // len(aSample) } oList:cAlias = "ARRAY" oList:GoTop() oList:Refresh() // Sort aSample array if need @ 20, 5 BUTTON oBtn PROMPT "&Sort Array" OF oDlg SIZE 130,10 PIXEL ; ACTION ( oBtn:Disable() ,; aSample := MyArrSort( aSample ) ,; oBtn:Enable() ,; oList:GoTop() ,; oList:Refresh() ; ) ACTIVATE DIALOG oDlg CENTERED return NIL //--------------------------------------------------// // cData = aArray[ nPosition ] // solution for big array: cData = MyArrItem( aArray, nPosition ) FUNCTION MyArrItem( aArray, nPosition ) nRow = INT(nPosition/4096) + 1 nCol = nPosition - (nRow - 1) * 4096 IF nCol=0 nRow = nRow -1 nCol=4096 ENDIF RETURN aArray[nRow, nCol] //--------------------------------------------------// // nLen = LEN( aArray ) // solution for big array: nLen = MyArrLen( aArray ) FUNCTION MyArrLen( aArray ) nLen = ( LEN(aArray) -1 ) * 4096 nLen = nLen + LEN(aArray[LEN(aArray)]) RETURN nLen //--------------------------------------------------// // AADD( aArray, cData ) // solution for big array: MyArrAdd( aArray, cData ) FUNCTION MyArrAdd( aArray, cData ) nLen = LEN(aArray) if nLen = 0 .or. LEN( aArray[nLen] ) = 4096 aadd( aArray, {} ) nLen = nLen +1 endif aadd( aArray[nLen], cData ) RETURN NIL //--------------------------------------------------// // ASORT( aArray ) // solution for big array: MyArrSort( aArray ) // May be someone know better way to sort ? FUNCTION MyArrSort( aArray ) for i=1 to len(aArray) // Sorting ARRAY in every element asort(aArray[i]) next if len(aArray) > 1 // MERGE sorted ARRAYS in every element in one big array aNewArray = {aArray[1]} for i=2 to len(aArray) aTempArr1 = aNewArray aTempArr2 = aArray[i] aNewArray = {} nBrojac1 = 1 nBrojac2 = 1 lIzlez = .f. do while !lIzlez cPodatok1 = MyArrItem( aTempArr1, nBrojac1 ) // Item from bigarray cPodatok2 = aTempArr2[ nBrojac2 ] // Item from onedimensional array if cPodatok1 <= cPodatok2 MyArrAdd( aNewArray, cPodatok1 ) nBrojac1 = nBrojac1 +1 else MyArrAdd( aNewArray, cPodatok2 ) nBrojac2 = nBrojac2 +1 endif if nBrojac1 > MyArrLen( aTempArr1 ) for j = nBrojac2 to LEN( aTempArr2 ) MyArrAdd( aNewArray, aTempArr2[j] ) next lIzlez = .t. elseif nBrojac2 > LEN( aTempArr2 ) for j = nBrojac1 to MyArrLen( aTempArr1 ) MyArrAdd( aNewArray, MyArrItem( aTempArr1, j ) ) next lIzlez = .t. endif enddo next endif RETURN aNewArray
AS2 protocol
Hello, Has anyone created a FWH application to transfer files, specifically EDI messages, via AS2 protocol. If so, can you post sample code? Thank you,
AS2 protocol
I do a lot of EDI. Usually they are just text files in 1 of 2 standards. ANSII X12 (American standard) or EDIFACT (European Standard). I do most in ANSII but there are a couple documents I do in EDIFACT. Do you know what documents you need to transmit? The other issue is how they are transmitted. Most companies these days use FTP but some still use a service to trade documents.
AS2 protocol
Dear Gale, Thank you for your response. We will be exchanging ANSI X12 and EDIFACT to start. We have been communicating via FTP and certain partners are asking us to upgrade to AS2. Can you send me a private message via e-mail at Darrell DOT Ortiz AT cdmsoft DOT com with your telephone number so we can discuss further? Thank you,
AS2 protocol
Done.
AS400 and Oracle Application
Can I remote directly an As400 Machine from inside FWH and extract data from Oracle Apllication to FWH application directly .
AS400 and Oracle Application
Yes, you can ODBC and it a must to use a middleware software from IBM as ClientAccess
AS400 and Oracle Application
Yes, you can use ADO, and OLE, fast yet efficient.
ASAVE() AREAD()
Amigos:Estamos trabajando con aSave() y aRead() en la grabacion y recuperacion de arrays en campos memo. Los datos que contienen estos arrays son datos binarios, con caracteres de control, etc.Algunos arrays se graban y recuperan bien, pero otros al recuperarlos encontramos que no son iguales al original.Alguien sabe algo sobre este tema? tal vez alguna versión de fivewin realizó la corrección.Nosotros tenemos el build diciembre 2005, fivewin para clipper.Desde ya muchas gracias.
ASAVE() AREAD()
Ricardo,Los datos binarios estan almacenados como cadenas ?
ASAVE() AREAD()
Antonio.Que tal. Soy jorge mansur, socio de ricardo.El tema es este. Queremos migrar a Harbour. Estamos usando las librerias de FlexFile que no estan disponibles para Harbour.Lo que hicimos fue lo siguiente.Intento 1:Cada campo memo que contiene los datos de FlexFile lo leemos con Flex y la salvamos en otro campo memo con ASave()Luego cuando queremos recuperar desde nuestro ERP los datos con ARead() algunos campos memos estan truncados. Como que no se grabo toda la informacion con Asave()Intento 2:Leemos cada campo memo con Flex lo convertimos con cmimeenc() y lo grabamos con ASave()Funciona, peroo en algunos campos memos, la funcion cmimeenc() revienta. Es por el limite de los 64Kb del 16bits.Intento 3:Consultarte como podemos sacar Flex. para ya compilar en Harbour.Un abrazo grandee
ASAVE() AREAD()
Jorge,Que tipos de datos guardais ? Arrays, ficheros, etc ?Se puede construir facilmente una funcion en C que lo transforme a cadena y se podria guardar como blobs, o ficheros en disco, etc.
ASAVE() AREAD()
Antonio:Te preparamos un post con el pedazo concreto de programa y un registro con los datos que fallan para que opines al respecto.Entre tanto, te deseamos desde EvoSistemas ( y lo hacemos extensivo a la comunidad FiveWin ) unas muy felices fiestas! para vos y los tuyos.
ASAVE() AREAD()
Ricardo,Gracias, igualmente <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ASAVE() AREAD()
Que tal Antonio. Espero qye hayas pasado un muy buen comienzo de año. Solo te moletaba para consultarte. Que diferencia hay entre una funcion C que convierta datos binarios a cadenas para guardarlos en los campos memo, y la funcion cmimeenc? No tendria el mismo problema de que se me revienta por el uso de la memoria? La otra que se me ocurrio es utilizar tambien ya un RDD, y leer de flexfile y pasarlos a blobs. Pero bueno. sigo analizando. graciasss
ASAVE() AREAD()
Jorge, > Que diferencia hay entre una funcion C que convierta datos binarios a cadenas para guardarlos en los campos memo, y la funcion cmimeenc? > La función en C no realizaría ninguna modificación/manipulación de los datos binarios originales. Es decir, se pasarían a tipo cadena sin modificarlos en absoluto. La función a usar es _retclen() desde C.
ASC bug - re: Barbara THIAM's post
Since the change in the fivetech forum I could not reply to Barbara's post. However the following code worked flawlessly under FWH using Harbour Alpha build 44.0 and also using xHarbour build 99.3 // Test of ASC function FUNCTION MAIN() LOCAL n, cStr := "", lf := CHR(13)+CHR(10) FOR n := 0 TO 255 cStr += LSTR( ASC(CHR(n)) )+IF(n%10=0,lf," - ") NEXT MSGINFO( cStr ) RETURN NIL FUNCTION LSTR( val ) RETURN LTRIM(STR( val ))
ASC bug - re: Barbara THIAM's post
Hello Mr Babin, Hello Everybody, I am testing xHarbour build 0.99.5, waiting new release of Harbour. I get an executable, but when i run it, this message appears at first : "ALERT.PRG was compiled by older version, PCODE version 5 is no longer supported - Please recompile." Are the FWH 2.5 lib's not compatibles with xHarbour 0.99.5 ? Regards, Badara
ASC bug - re: Barbara THIAM's post
You have to recompile *all* your PRGs and *all* FWH PRGs. EMG
ASC bug - re: Barbara THIAM's post
Hello EMG, Can you tell me the betters compiler options to compile all Fivewin for Harbour .prg with xHarbour in one pass (if possible) ? I have some compiler errors with these options : "-l -n -w -m -gc0" ie error : "dbms.ch (84) Warning I0003 : No markers in repeatable group [;#undef _Dbms_ ] - group will never be used." Regards, Badara
ASC bug - re: Barbara THIAM's post
This is what I use: SET HARBOURCMD=/a /es1 /gc0 /l /m /n /q /w Anyway, you don't have to recompile the following PRGs: expbuild.prg db10.prg odbc32.prg dbm.prg vbxctrl.prg _index.prg dbms.prg ddeserv.prg field.prg tnewsins.prg c3.prg EMG
ASC bug - re: Barbara THIAM's post
Thanks Enrico. Now i can run the program, but this code work bad : ************* FUNCTION TEST() ********** LOCAL cName := SPACE(10) SET EXACT ON IF cName = "" MessageBox("OK : This work like Clipper") ELSE MessageBox("STOP : This work bad") ENDIF RETURN NIL This is too hard... (But i confirm, Asc() and ReadInsert() work fine with xHarbour 0.99.5) Badara <!-- m --><a class="postlink" href="http://www.icim.fr">http://www.icim.fr</a><!-- m -->
ASC bug - re: Barbara THIAM's post
This works fine for me: ************* FUNCTION TEST() ********** LOCAL cName := SPACE(10) SET EXACT ON IF cName = "" ? "OK : This work like Clipper" ELSE ? "STOP : This work bad" ENDIF INKEY(0) RETURN NIL EMG
ASC bug - re: Barbara THIAM's post
With all these lib it's always impossible for me. Perhaps the order of one lib ? ********* e:\borland\bcc55\lib\c0w32.obj + E:\MAINTEST\MAINTEST.obj + , + E:\MAINTEST\TEST.exe,, + E:\PROGS\LIB32\Ace32.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\rdd.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\rddads.LIB + + E:\FWH\LIB\FIVEHX.LIB + E:\FWH\LIB\FIVEHC.LIB + + E:\XHARBOU\XHARBO~1.BCC\LIB\DBFCDX.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\DBFFPT.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\DBFDBT.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\DBFNTX.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\rtl.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\vm.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\gtstd.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\gtwin.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\lang.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\macro.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\common.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\pp.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\codepage.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\hbzip.LIB + + E:\XHARBOU\XHARBO~1.BCC\LIB\nulsys.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\ct.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\dllmain.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\hbcc.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\hbodbc.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\optcon.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\optgui.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\tip.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\libmisc.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\libnf.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\whoo.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\design.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\html.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\internet.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\what32.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\telepath.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\xwt.LIB + E:\XHARBOU\XHARBO~1.BCC\LIB\wvtgui.LIB + + E:\BORLAND\BCC55\LIB\cw32.LIB + E:\BORLAND\BCC55\LIB\import32.LIB + E:\BORLAND\BCC55\LIB\psdk\odbc32.LIB + E:\BORLAND\BCC55\LIB\psdk\nddeapi.LIB + E:\BORLAND\BCC55\LIB\psdk\iphlpapi.LIB + E:\BORLAND\BCC55\LIB\psdk\rasapi32.LIB ***********
ASC bug - re: Barbara THIAM's post
What is the exact error message you get? EMG
ASC bug - re: Barbara THIAM's post
No error message now. When there is SET EXACT ON, a cVariable with space(s), like cVar := " ", is not equal to "" for xHarbour. When SET EXACT OFF, it's ok, " " = "". With Clipper, " " = "", always. Badara
ASC bug - re: Barbara THIAM's post
From your sample ************* FUNCTION TEST() ********** LOCAL cName := SPACE(10) SET EXACT ON IF cName = "" ? "OK : This work like Clipper" ELSE ? "STOP : This work bad" ENDIF INKEY(0) RETURN NIL I get "OK : This work like Clipper" using the latest xHarbour from CVS. EMG
ASC bug - re: Barbara THIAM's post
Hello EMG, Thanks for your answer. When post the message below to "join@xharbour.org", i get a non-delivery message : "Invalid final delivery userid: <!-- e --><a href="mailto:patrick@xharbour.com">patrick@xharbour.com</a><!-- e -->". ************** Hello, I am Fivewin user and i want to join the xHarbour team and access to the developpers mailing list and CVS. I want help you to extract all bugs from xHarbour, by report you all problems found. Regards, Badara Thiam Author of ICIM Sofware Contact : <!-- e --><a href="mailto:tb@icim.fr">tb@icim.fr</a><!-- e --> Site internet : <!-- m --><a class="postlink" href="http://www.icim.fr">http://www.icim.fr</a><!-- m --> **************
ASC bug - re: Barbara THIAM's post
I just forward your message to the xHarbour developer's list. EMG
ASC bug - re: Barbara THIAM's post
And this is the answer from Ron Pinkas: "You may tell Badara, that he may report any issues on the xHarbour.Unstable.CVS NG which is the forum dedicated to such activity. IOTH he has development plans, please ask him to forward an email with his development proposals. xHarbour is always interested in additional developers, but otherwise the Developers list dedicated to Developers only." EMG
ASC bug - re: Barbara THIAM's post
Enrico, This is my response to Ron Pinkas ------------ Ron, My actual developpement plan is to obtain the latest xHarbour lib and bin possible to test with my several code lines, to be sure xHarbour has no others very important bugs. Today i can't continue my tests because " " is not equal to "" when Set Exact is On, with the version of xHarbour i use. I could give you others informations to debug xHarbour today, if the latest update was in my pc. It's not only for help you, i am before all interested to create the 32 bit version of my sofware. If i can accelerate the processus of developpement of [x]Harbour, tell me how please. If i must wait few months to test again, i think this is not the better way. The first project of developpement in my head is : Give to [x]Harbour the real ability to work exactly like Clipper, where Clipper do what [x]Harbour do. I am not interested by others projects of [x]Harbour today. Just Clipper -> [x]Harbour compatibility. My source code writted in Clipper 5.3b is 235000 lines big. If a bug is not fixed, i am sure it occur in my code. My tests have, and can again, greatly help to increase the reliability of [x]Harbour. Regards, Badara Thiam <!-- m --><a class="postlink" href="http://www.icim.fr">http://www.icim.fr</a><!-- m -->
ASC bug - re: Barbara THIAM's post
Do I have to forward it to Ron or can you do it yourself? EMG
ASC bug - re: Barbara THIAM's post
I have not his email adress. Like you want.
ASC bug - re: Barbara THIAM's post
Here it is: <!-- e --><a href="mailto:Ron@remove-this.xharbour.com">Ron@remove-this.xharbour.com</a><!-- e --> EMG PS. Remove "remove-this.".
ASC bug - re: Barbara THIAM's post
Thanks Enrico Regards, Badara
ASC bug - re: Barbara THIAM's post
Badara, Please register on these forums. Its just a few minutes issue. Thanks.
ASC bug - re: Barbara THIAM's post
Antonio, I have many passwords and i not remember my password and email address used in these forums. It's why i am not register today. Saludos, Badara
ASC bug - re: Barbara THIAM's post
Badara, You may register again and write down your login and password for future use.
ASC bug - re: Barbara THIAM's post
Antonio, There is no way to continue under FWH 2.5 today. Tell this to your users please. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Regards,
ASC bug - re: Barbara THIAM's post
Badara, FWH 2.5 users should upgrade to 2.6 version. We try to keep backwards compatibility as much as we can, but sometimes its not possible.
ASCAN CON TSBROWSE
Buenas tardes amigos del foro Intento en la primera columna de un tsbrowse controlar si un codigo ya se ingreso y sumar el numero de veces de cada uno, he intentado de estas maneras.cual := ascan(aTestData[oBrw:nAt,1],cnumart)cual := ascan(aTestdata,cnumart)el valor devuelto siempre es ceroGracias.
ASCAN CON TSBROWSE
EASYSOFT, intenta asi :cual:=aScan( aTestdata, {|array| array[1]=cNumArt }) SaludosJoel Andujo
ASCAN CON TSBROWSE
Joel Gracias Funciona perfecto
ASCAN on 2 colums
[code=fw:3blbrn1g]<div class="fw" id="{CB}" style="font-family: monospace;">nAt := AScan<span style="color: #000000;">&#40;</span> arr, <span style="color: #000000;">&#123;</span> |a| Upper<span style="color: #000000;">&#40;</span> IfNil<span style="color: #000000;">&#40;</span> a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"TEST"</span> .and. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Upper<span style="color: #000000;">&#40;</span> IfNil<span style="color: #000000;">&#40;</span> a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"TEST1"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:3blbrn1g]
ASCAN on 2 colums
Hi, Is it possible to do a array-search where for example the first column = 'TEST' and the seconds column = 'TEST1'? I also want to search on the upper-case, but the problem is that sometimes the value = nil, so I get an error with upper. The array is comming from an excel-file read with [code=fw:3kky81f9]<div class="fw" id="{CB}" style="font-family: monospace;">  oRange   := oSheet:<span style="color: #000000;">UsedRange</span><br />arr = ArrTranspose<span style="color: #000000;">&#40;</span> oRange:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> </div>[/code:3kky81f9]
ASCAN on 2 colums
hi, [quote="Marc Vanzegbroeck":3ke82rax] Is it possible to do a array-search where for example the first column = 'TEST' and the seconds column = 'TEST1'? I also want to search on the upper-case, but the problem is that sometimes the value = nil, so I get an error with upper. The array is comming from an excel-file read with [code=fw:3ke82rax]<div class="fw" id="{CB}" style="font-family: monospace;">  oRange   := oSheet:<span style="color: #000000;">UsedRange</span><br />arr = ArrTranspose<span style="color: #000000;">&#40;</span> oRange:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> </div>[/code:3ke82rax][/quote:3ke82rax] just a Idea to use a function, not tested [code=fw:3ke82rax]<div class="fw" id="{CB}" style="font-family: monospace;">   cSeek := <span style="color: #ff0000;">"ABC"</span><br />   nElement := AScan<span style="color: #000000;">&#40;</span> aArray, ;  <br />                      <span style="color: #000000;">&#123;</span>|a,i| Test<span style="color: #000000;">&#40;</span>a,i,cSeek<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />                      nStart <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">FUNCTION</span> Test<span style="color: #000000;">&#40;</span>a,i,cSeek<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nPosi := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span>a<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">-1</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span>a<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">-1</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #B900B9;">// compare as you need</span><br />   <span style="color: #00C800;">IF</span> cSeek $ a<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .OR. cSeek $ a<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />      nPosi := i<br />   <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span> nPosi<br /> </div>[/code:3ke82rax]
ASCAN question
I have an array (aWork ) , and each element is an array with 4 elements: The data arrays are: [1] is a character field of 5 digits [2] is a counter [3] is an accumulator ( totals ) [4] is a description I want to use aScan on aWork on the first element, and when I find the matching array, I will increment [2] and [3]. I can I use ASCAN( ) to search an element in an array of arrays ?
ASCAN question
Tim, From xharbour Language Reference Guide: [quote:1jezs9d7]The array function AScan() traverses the array <aArray> for the value specified with <xbSearch>. If <xbSearch> is not a code block, AScan() compares the values of each array element for being equal with the searched value. If this comparison yields .T. (true), the function stops searching and returns the numeric position of the array element containing the searched value. If a code block is passed for <xbSearch>, it is evaluated and receives as parameter the value of the current array element. The code block must contain a comparison rule that yields a logical value. AScan() considers the value as being found when the codeblock returns .T. (true). Otherwise the function proceeds with the next array element. [/quote:1jezs9d7][code=fw:1jezs9d7]<div class="fw" id="{CB}" style="font-family: monospace;">The example demonstrates simple and complex searching in arrays.<br />   PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">LOCAL</span> aArray := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"A"</span>, <span style="color: #000000;">1</span>, Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">&#125;</span><br /><br />      <span style="color: #B900B9;">// one dimensional array</span><br />      ? AScan<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>             <span style="color: #B900B9;">// result: 2</span><br />      ? AScan<span style="color: #000000;">&#40;</span> aArray, .F. <span style="color: #000000;">&#41;</span>           <span style="color: #B900B9;">// result: 5</span><br /><br />      ? AScan<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">&#123;</span>|x| Valtype<span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">"D"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />                                       <span style="color: #B900B9;">// result: 3</span><br /><br />      <span style="color: #B900B9;">// two dimensional array</span><br />      aArray := Directory<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"*.prg"</span> <span style="color: #000000;">&#41;</span><br /><br />      ? AScan<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">&#123;</span>|a| Upper<span style="color: #000000;">&#40;</span>a<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TEST.PRG"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />                                       <span style="color: #B900B9;">// result: 28</span><br />   <span style="color: #00C800;">RETURN</span></div>[/code:1jezs9d7] Maybe by using the codeblock you can find a solution.
ASCAN question
[code=fw:2rhyal4u]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> aWork, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == cSeek <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp;aWork<span style="color: #000000;">&#91;</span> nAt, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> += <span style="color: #000000;">1</span><br />&nbsp; &nbsp;aWork<span style="color: #000000;">&#91;</span> nAt, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> += nAmount<br /><span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:2rhyal4u]
ASCAN reverse ?
hi, i have a (short) Array where i want to find a Item but must start at End of Array a search backward is there a Way to use ASCAN() "reverse" <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
ASCAN reverse ?
Hi Jimmy, just use [b:1zaus8rd]RAscan()[/b:1zaus8rd] <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> // The example demonstrates the difference between AScan() and RAscan(). PROCEDURE Main() LOCAL aArray := { "A", 1, Date(), 1, .F. } ? Ascan( aArray, 1 ) // result: 2 ? RAScan( aArray, 1 ) // result: 4 RETURN Regards, Detlef p.s. du wohnst in Hamburg? Das ist nicht weit von mir. Vielleicht könnten wir uns austauschen?
ASCAN reverse ?
hi Detlef, [quote="Detlef":206pgqb0]just use [b:206pgqb0]RAscan()[/b:206pgqb0] <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->[/quote:206pgqb0] so easy, thx [quote="Detlef":206pgqb0] p.s. du wohnst in Hamburg? Das ist nicht weit von mir. Vielleicht könnten wir uns austauschen?[/quote:206pgqb0] JA schreibe mir doch bitte eine private Message mit Email Adresse dann kann ich dir antworten. AUGE_OHR AT WEB.DE
ASCII TO EBCDIC
Buenas foro, és posible hacer esto para FiveWin? Gracias, [code=fw:1qybq7dh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #ff0000;">'**************************************<br />'</span> <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">ASCII_TO_EBCDIC</span><br /><span style="color: #ff0000;">' Description:Convert ASCII strings into<br />'</span> &nbsp; &nbsp; EBCDIC code <span style="color: #0000ff;">to</span> upload into an IBM mainfr<br /><span style="color: #ff0000;">' &nbsp; &nbsp; ame. This code may be used also as a bas<br />'</span> &nbsp; &nbsp; ic encrypting <span style="color: #00C800;">method</span>. Both ASCII <span style="color: #0000ff;">to</span> EBCD<br /><span style="color: #ff0000;">' &nbsp; &nbsp; IC and EBCDIC to ASCII are included in t<br />'</span> &nbsp; &nbsp; his code.<br /><span style="color: #ff0000;">' By: Aldo Vargas<br />'</span><br /><span style="color: #ff0000;">'<br />'</span> Inputs:<span style="color: #000000;">None</span><br /><span style="color: #ff0000;">'<br />'</span> Returns:<span style="color: #000000;">None</span><br /><span style="color: #ff0000;">'<br />'</span>Assumes:<span style="color: #000000;">None</span><br /><span style="color: #ff0000;">'<br />'</span>Side Effects:<span style="color: #000000;">None</span><br /><span style="color: #ff0000;">'This code is copyrighted and has limite<br />'</span> &nbsp; &nbsp; d warranties.<br /><span style="color: #ff0000;">'Please see <!-- m --><a class="postlink" href="http://www.Planet-Source-Cod">http://www.Planet-Source-Cod</a><!-- m --><br />'</span> &nbsp; &nbsp; e.com/xq/ASP/txtCodeId<span style="color: #000000;">.5902</span>/lngWId<span style="color: #000000;">.1</span>/qx/<br /><span style="color: #ff0000;">' &nbsp; &nbsp; vb/scripts/ShowCode.htm<br />'</span><span style="color: #00C800;">for</span> details.<br /><span style="color: #ff0000;">'**************************************<br /><br /><br /><br />Function ascii_to_ebcdic(ByVal buffer As String) As String<br /><br />&nbsp; &nbsp; Dim ascii As Variant<br />&nbsp; &nbsp; Dim i As Long, bufferlen As Long<br /><br />&nbsp; &nbsp; ascii = Array( _<br />&nbsp; &nbsp; &H0, &H1, &H2, &H3, &H37, &H2D, &H2E, &H2F, &H16, &H5, &H25, &HB, &HC, &HD, &HE, &HF, _<br />&nbsp; &nbsp; &H10, &H11, &H12, &H13, &H3C, &H3D, &H32, &H26, &H18, &H19, &H3F, &H27, &H1C, &H1D, &H1E, &H1F, _<br />&nbsp; &nbsp; &H40, &H4F, &H7F, &H7B, &H5B, &H6C, &H50, &H7D, &H4D, &H5D, &H5C, &H4E, &H6B, &H60, &H4B, &H61, _<br />&nbsp; &nbsp; &HF0, &HF1, &HF2, &HF3, &HF4, &HF5, &HF6, &HF7, &HF8, &HF9, &H7A, &H5E, &H4C, &H7E, &H6E, &H6F, _<br />&nbsp; &nbsp; &H7C, &HC1, &HC2, &HC3, &HC4, &HC5, &HC6, &HC7, &HC8, &HC9, &HD1, &HD2, &HD3, &HD4, &HD5, &HD6, _<br />&nbsp; &nbsp; &HD7, &HD8, &HD9, &HE2, &HE3, &HE4, &HE5, &HE6, &HE7, &HE8, &HE9, &H4A, &HE0, &H5A, &H5F, &H6D, _<br />&nbsp; &nbsp; &H79, &H81, &H82, &H83, &H84, &H85, &H86, &H87, &H88, &H89, &H91, &H92, &H93, &H94, &H95, &H96, _<br />&nbsp; &nbsp; &H97, &H98, &H99, &HA2, &HA3, &HA4, &HA5, &HA6, &HA7, &HA8, &HA9, &HC0, &H6A, &HD0, &HA1, &H7, _<br />&nbsp; &nbsp; &H20, &H21, &H22, &H23, &H24, &H15, &H6, &H17, &H28, &H29, &H2A, &H2B, &H2C, &H9, &HA, &H1B, _<br />&nbsp; &nbsp; &H30, &H31, &H1A, &H33, &H34, &H35, &H36, &H8, &H38, &H39, &H3A, &H3B, &H4, &H14, &H3E, &HE1, _<br />&nbsp; &nbsp; &H41, &H42, &H43, &H44, &H45, &H46, &H47, &H48, &H49, &H51, &H52, &H53, &H54, &H55, &H56, &H57, _<br />&nbsp; &nbsp; &H58, &H59, &H62, &H63, &H64, &H65, &H66, &H67, &H68, &H69, &H70, &H71, &H72, &H73, &H74, &H75, _<br />&nbsp; &nbsp; &H76, &H77, &H78, &H80, &H8A, &H8B, &H8C, &H8D, &H8E, &H8F, &H90, &H9A, &H9B, &H9C, &H9D, &H9E, _<br />&nbsp; &nbsp; &H9F, &HA0, &HAA, &HAB, &HAC, &HAD, &HAE, &HAF, &HB0, &HB1, &HB2, &HB3, &HB4, &HB5, &HB6, &HB7, _<br />&nbsp; &nbsp; &HB8, &HB9, &HBA, &HBB, &HBC, &HBD, &HBE, &HBF, &HCA, &HCB, &HCC, &HCD, &HCE, &HCF, &HDA, &HDB, _<br />&nbsp; &nbsp; &HDC, &HDD, &HDE, &HDF, &HEA, &HEB, &HEC, &HED, &HEE, &HEF, &HFA, &HFB, &HFC, &HFD, &HFE, &HFF)<br />&nbsp; &nbsp; bufferlen = Len(buffer)<br /><br /><br />&nbsp; &nbsp; For i = 1 To bufferlen<br />&nbsp; &nbsp; &nbsp; &nbsp; Mid$(buffer, i, 1) = Chr$(ascii(Asc(Mid$(buffer, i, 1))))<br />&nbsp; &nbsp; Next<br /><br />&nbsp; &nbsp; ascii_to_ebcdic = buffer<br /><br />End Function<br /><br />Function ebcdic_to_ascii(ByVal buffer As String) As String<br /><br />&nbsp; &nbsp; Dim ebcdic As Variant<br />&nbsp; &nbsp; Dim i As Long, bufferlen As Long<br /><br />&nbsp; &nbsp; ebcdic = Array( _<br />&nbsp; &nbsp; &H0, &H1, &H2, &H3, &H9C, &H9, &H86, &H7F, &H97, &H8D, &H8E, &HB, &HC, &HD, &HE, &HF, _<br />&nbsp; &nbsp; &H10, &H11, &H12, &H13, &H9D, &H85, &H8, &H87, &H18, &H19, &H92, &H8F, &H1C, &H1D, &H1E, &H1F, _<br />&nbsp; &nbsp; &H80, &H81, &H82, &H83, &H84, &HA, &H17, &H1B, &H88, &H89, &H8A, &H8B, &H8C, &H5, &H6, &H7, _<br />&nbsp; &nbsp; &H90, &H91, &H16, &H93, &H94, &H95, &H96, &H4, &H98, &H99, &H9A, &H9B, &H14, &H15, &H9E, &H1A, _<br />&nbsp; &nbsp; &H20, &HA0, &HA1, &HA2, &HA3, &HA4, &HA5, &HA6, &HA7, &HA8, &H5B, &H2E, &H3C, &H28, &H2B, &H21, _<br />&nbsp; &nbsp; &H26, &HA9, &HAA, &HAB, &HAC, &HAD, &HAE, &HAF, &HB0, &HB1, &H5D, &H24, &H2A, &H29, &H3B, &H5E, _<br />&nbsp; &nbsp; &H2D, &H2F, &HB2, &HB3, &HB4, &HB5, &HB6, &HB7, &HB8, &HB9, &H7C, &H2C, &H25, &H5F, &H3E, &H3F, _<br />&nbsp; &nbsp; &HBA, &HBB, &HBC, &HBD, &HBE, &HBF, &HC0, &HC1, &HC2, &H60, &H3A, &H23, &H40, &H27, &H3D, &H22, _<br />&nbsp; &nbsp; &HC3, &H61, &H62, &H63, &H64, &H65, &H66, &H67, &H68, &H69, &HC4, &HC5, &HC6, &HC7, &HC8, &HC9, _<br />&nbsp; &nbsp; &HCA, &H6A, &H6B, &H6C, &H6D, &H6E, &H6F, &H70, &H71, &H72, &HCB, &HCC, &HCD, &HCE, &HCF, &HD0, _<br />&nbsp; &nbsp; &HD1, &H7E, &H73, &H74, &H75, &H76, &H77, &H78, &H79, &H7A, &HD2, &HD3, &HD4, &HD5, &HD6, &HD7, _<br />&nbsp; &nbsp; &HD8, &HD9, &HDA, &HDB, &HDC, &HDD, &HDE, &HDF, &HE0, &HE1, &HE2, &HE3, &HE4, &HE5, &HE6, &HE7, _<br />&nbsp; &nbsp; &H7B, &H41, &H42, &H43, &H44, &H45, &H46, &H47, &H48, &H49, &HE8, &HE9, &HEA, &HEB, &HEC, &HED, _<br />&nbsp; &nbsp; &H7D, &H4A, &H4B, &H4C, &H4D, &H4E, &H4F, &H50, &H51, &H52, &HEE, &HEF, &HF0, &HF1, &HF2, &HF3, _<br />&nbsp; &nbsp; &H5C, &H9F, &H53, &H54, &H55, &H56, &H57, &H58, &H59, &H5A, &HF4, &HF5, &HF6, &HF7, &HF8, &HF9, _<br />&nbsp; &nbsp; &H30, &H31, &H32, &H33, &H34, &H35, &H36, &H37, &H38, &H39, &HFA, &HFB, &HFC, &HFD, &HFE, &HFF)<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; bufferlen = Len(buffer)<br /><br /><br />&nbsp; &nbsp; For i = 1 To bufferlen<br />&nbsp; &nbsp; &nbsp; &nbsp; Mid$(buffer, i, 1) = Chr$(ebcdic(Asc(Mid$(buffer, i, 1))))<br />&nbsp; &nbsp; Next<br /><br />&nbsp; &nbsp; ebcdic_to_ascii = buffer<br /><br />End Function<br /></span></div>[/code:1qybq7dh] 
ASCII TO EBCDIC
Hola no se si funciona, pero puedes probarlo [code=fw:2zdjid53]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span> a, b<br />    a = ASCII_to_EBCDIC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"HELLO WORLD"</span> <span style="color: #000000;">&#41;</span><br />    b = EBCDIC_to_ASCII<span style="color: #000000;">&#40;</span> a <span style="color: #000000;">&#41;</span><br />    ? a, b<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//    ASCII to EBCDIC translation table</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">static</span> char ASCII_translate_EBCDIC <span style="color: #000000;">&#91;</span> <span style="color: #000000;">256</span> <span style="color: #000000;">&#93;</span> =<br /><span style="color: #000000;">&#123;</span><br />0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,<br />0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,<br />0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,<br />0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,<br />0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D,<br />0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,<br />0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8,<br />0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,<br />0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8,<br />0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,<br />0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,<br />0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D,<br />0x7D, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88,<br />0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,<br />0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,<br />0xA8, 0xA9, 0xC0, 0x6A, 0xD0, 0xA1, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B,<br />0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B <span style="color: #000000;">&#125;</span> ;<br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//    EBCDIC to ASCII translation table</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">static</span> char EBCDIC_translate_ASCII <span style="color: #000000;">&#91;</span> <span style="color: #000000;">256</span> <span style="color: #000000;">&#93;</span> =<br /><span style="color: #000000;">&#123;</span><br />0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,<br />0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,<br />0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,<br />0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,<br />0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,<br />0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,<br />0x2E, 0x2E, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,<br />0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x2E, 0x3F,<br />0x20, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x2E, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,<br />0x26, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E,<br />0x2D, 0x2F, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x7C, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,<br />0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,<br />0x2E, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,<br />0x69, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71,<br />0x72, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,<br />0x7A, 0x2E, 0x2E, 0x2E, 0x5B, 0x2E, 0x2E,<br />0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x2E, 0x2E, 0x2E, 0x2E, 0x5D, 0x2E, 0x2E,<br />0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,<br />0x49, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51,<br />0x52, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x5C, 0x2E, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,<br />0x5A, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E,<br />0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,<br />0x39, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E <span style="color: #000000;">&#125;</span> ;<br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//      EBCDIC_to_ASCII (string conversion)</span><br /><span style="color: #B900B9;">//</span><br />void    EBCDIC_to_ASCII <span style="color: #000000;">&#40;</span> long buf_length, char *buf_addr1, char *buf_addr2<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span>   int i;<br />    unsigned char temp;<br />    <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>i=<span style="color: #000000;">0</span>; i < buf_length; i++<span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        temp = <span style="color: #000000;">&#40;</span>unsigned char<span style="color: #000000;">&#41;</span> buf_addr1<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>;<br />        buf_addr2<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = EBCDIC_translate_ASCII<span style="color: #000000;">&#91;</span>temp<span style="color: #000000;">&#93;</span>;<br />        buf_addr2<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'<span style="color: #000000;">\0</span>'</span>;              <span style="color: #B900B9;">// <nul> terminate</span><br />    <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//      ASCII_to_EBCDIC (string conversion)</span><br /><span style="color: #B900B9;">//</span><br />void    ASCII_to_EBCDIC <span style="color: #000000;">&#40;</span> long buf_length, char *buf_addr1, char *buf_addr2<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span>   int i;<br />    unsigned char temp;<br />    <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>i=<span style="color: #000000;">0</span>; i < buf_length; i++<span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        temp = <span style="color: #000000;">&#40;</span>unsigned char<span style="color: #000000;">&#41;</span> buf_addr1<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>;<br />        buf_addr2<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = ASCII_translate_EBCDIC<span style="color: #000000;">&#91;</span>temp<span style="color: #000000;">&#93;</span>;<br />        buf_addr2<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'<span style="color: #000000;">\0</span>'</span>;              <span style="color: #B900B9;">// <nul> terminate</span><br />    <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> ASCII_TO_EBCDIC <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />    const char * src = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    int iLenSrc = hb_parclen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    char * dest = hb_xgrab<span style="color: #000000;">&#40;</span> iLenSrc <span style="color: #000000;">&#41;</span>;<br />    ASCII_to_EBCDIC<span style="color: #000000;">&#40;</span> iLenSrc, <span style="color: #000000;">&#40;</span>char*<span style="color: #000000;">&#41;</span>src,  dest <span style="color: #000000;">&#41;</span>;<br />    hb_retc<span style="color: #000000;">&#40;</span> dest <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> EBCDIC_TO_ASCII <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />    const char * src = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    int iLenSrc = hb_parclen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    char * dest = hb_xgrab<span style="color: #000000;">&#40;</span> iLenSrc <span style="color: #000000;">&#41;</span>;<br />    EBCDIC_to_ASCII<span style="color: #000000;">&#40;</span> iLenSrc, <span style="color: #000000;">&#40;</span>char*<span style="color: #000000;">&#41;</span>src,  dest <span style="color: #000000;">&#41;</span>;<br />    hb_retc<span style="color: #000000;">&#40;</span> dest <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /><br /> </div>[/code:2zdjid53]
ASCII TO EBCDIC
Gracias Daniel, el que intento hacer, és esto: <!-- m --><a class="postlink" href="http://fivewin.com.br/index.php?/topic/21768-como-converter-comandos-asc-em-basic-para-asc-do-five/">http://fivewin.com.br/index.php?/topic/ ... c-do-five/</a><!-- m --> Salu2.
ASCII TO EBCDIC
Daniel, las dos funciones funcionan perfectamente, a una velocidad alucinante !!! Convertí un archivo de texto de longitud de registro 460 (3368053760/460 = 7.321.856 registros) a dbf en 00:04:35. Lo compare con rutinas que utilizaba anteriormente y genera las bases exactamente igual. Ahora si lo compilo tanto en Harbour como en xHarbour en 32bits compila perfectamente, pero si lo compilo con Harbour 64bits tira estos dos warning: [code=fw:2kehnok1]<div class="fw" id="{CB}" style="font-family: monospace;">??????????????????????????????????????????????????????????????????????????????<br />? FWH <span style="color: #000000;">64</span> <span style="color: #00C800;">for</span> Harbour <span style="color: #000000;">11.03</span> <span style="color: #000000;">&#40;</span>MSVC++<span style="color: #000000;">&#41;</span> Mar. <span style="color: #000000;">2011</span>      Harbour development <span style="color: #0000ff;">power</span> ??<br />? <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech, <span style="color: #000000;">1993</span><span style="color: #000000;">-2011</span>     <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span> ??<br />???????????????????????????????????????????????????????????????????????????????<br />  ?????????????????????????????????????????????????????????????????????????????<br />Compiling...<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1310011443<span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2013</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'Prueba01.prg'</span> and generating preprocessed output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'Prueba01.ppo'</span>...<br />Lines <span style="color: #000000;">4339</span>, Functions/Procedures <span style="color: #000000;">1</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'Prueba01.c'</span>... Done.<br />_______________________________________________________________________________<br />Compilador de optimización de C/C++ de Microsoft <span style="color: #000000;">&#40;</span>R<span style="color: #000000;">&#41;</span> versión <span style="color: #000000;">17.00</span><span style="color: #000000;">.50727</span><span style="color: #000000;">.1</span> para x64<br /><span style="color: #000000;">&#40;</span>C<span style="color: #000000;">&#41;</span> Microsoft Corporation. Reservados todos los derechos.<br /><br />Prueba01.c<br />Prueba01.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">121</span><span style="color: #000000;">&#41;</span> : <span style="color: #000000;">warning</span> C4244: <span style="color: #ff0000;">'inicializando'</span> : <span style="color: #000000;">conversi</span>ón de <span style="color: #ff0000;">'HB_SIZE'</span> a <span style="color: #ff0000;">'int'</span>; posible pérdida de datos<br />Prueba01.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">130</span><span style="color: #000000;">&#41;</span> : <span style="color: #000000;">warning</span> C4244: <span style="color: #ff0000;">'inicializando'</span> : <span style="color: #000000;">conversi</span>ón de <span style="color: #ff0000;">'HB_SIZE'</span> a <span style="color: #ff0000;">'int'</span>; posible pérdida de datos<br />_______________________________________________________________________________<br /><br />     Aplicacion Prueba01 compilada satisfactoriamente   <br />?????????????????????????????????????????????????????????????<br />Presione una tecla para continuar . . .</div>[/code:2kehnok1] Muchas gracias por este aporte !!! Un gran abrazo. Miguel
ASCII TO EBCDIC
Hola prueba cambiar a esta linea [code=fw:3ewcghjt]<div class="fw" id="{CB}" style="font-family: monospace;">HB_SIZE iLenSrc = hb_parclen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;</div>[/code:3ewcghjt]
ASCII TO EBCDIC
[quote="Daniel Garcia-Gil":geotk4e8]Hola prueba cambiar a esta linea [code=fw:geotk4e8]<div class="fw" id="{CB}" style="font-family: monospace;">HB_SIZE iLenSrc = hb_parclen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;</div>[/code:geotk4e8][/quote:geotk4e8] No, no sigue dando el mismo error. Abrazo.
ASCII85 Encoded GUID
Hi guys, I want to use GUID but in the shortest form possible. Then I stumble on <!-- m --><a class="postlink" href="https://blog.codinghorror.com/equipping-our-ascii-armor/">https://blog.codinghorror.com/equipping ... cii-armor/</a><!-- m --> Does anyone have a lib/routine that can encode/decode string using ASCII85? Thank you
ASORT que respete el orden original
La idea es que ordene un arreglo de acuerdo a uno de los elementos, pero que si todos ellos tienen el mismo valor, los deje en el mismo orden original. Ejemplo: aDatos:={{"Juan",10},{"Antonio",10},{"Carlos",10}} ASORT(aDatos,,,{|A,B|A[2]>B[2]}) //Para que los ordene segun el numero al hacer esto me regresa: Carlos 10 Antonio 10 Juan 10 o sea, al tener todos el mismo valor, invierte el orden en que los agregue, como hacer para que en este caso quede como estaba originalmente? 'chas gracias
ASP + xbScript
Hi ! I'm looking for samples , how to work with that . Also I have a question - will xbScript work well in ASP.NET ? If you can , please , provide some source code for sample ... Many thanks in advance ! With best regards ! Rimantas
ASP + xbScript
Rimantas,What you need about ASP? explain me more.
ASP + xbScript
[quote="Rochinha":lhh7l7y7]Rimantas, What you need about ASP? explain me more.[/quote:lhh7l7y7] It's requirement to do some things in the Web with dbf's and with ASP . I found some needful information in xHarbour.com pages .
ASP + xbScript
RimantasFisrt try to use WinASP( <!-- m --><a class="postlink" href="http://htcsoft.no-ip.com:82/">http://htcsoft.no-ip.com:82/</a><!-- m --> )This WebServer allow run xbase style scripts with .DBFs and .CDX indexes.You can develop in a little time one web application.
ASP + xbScript
You can try with [url:1vheyzem]ftp&#58;//ftp&#46;quiquesoft&#46;com/webserv&#46;zip[/url:1vheyzem]
ASP + xbScript
[quote="Rochinha":1wzzsg7u]Rimantas Fisrt try to use WinASP( <!-- m --><a class="postlink" href="http://htcsoft.no-ip.com:82/">http://htcsoft.no-ip.com:82/</a><!-- m --> ) This WebServer allow run xbase style scripts with .DBFs and .CDX indexes. You can develop in a little time one web application.[/quote:1wzzsg7u] At this time exist so many websers for free ... And the scripting language isn't a problem - I can write script in VBScript , Python and , at last , xbScript . So why to pay moneys for WinASP , when it's possible to do that without moneys ? ... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->) Also , in earliers versions , WinASP wasn't translated to english ...
ASP + xbScript
RimantasTry this my utilities:How to use:MakeHTM <dbf_file> example: MakeHTM clientsMakeHTM.PRG code:[code:1qn0il43] PARA cFile,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10 p1 &#58;= iif&#40;p1=NIL,"",p1&#41; p2 &#58;= iif&#40;p2=NIL,"",p2&#41; p3 &#58;= iif&#40;p3=NIL,"",p3&#41; p4 &#58;= iif&#40;p4=NIL,"",p4&#41; p5 &#58;= iif&#40;p5=NIL,"",p5&#41; p6 &#58;= iif&#40;p6=NIL,"",p6&#41; p7 &#58;= iif&#40;p7=NIL,"",p7&#41; p8 &#58;= iif&#40;p8=NIL,"",p8&#41; p9 &#58;= iif&#40;p9=NIL,"",p9&#41; p10 &#58;= iif&#40;p10=NIL,"",p10&#41; ? 'MAKEhtm 1&#46;0 Direiros Reservados 1999-2000 Soft Clever Informatica ME&#46;' if cFile = NIL // ? 'Uso &#58; MAKEhtm <NomeDohtm> &#91;op‡”es&#93; ' // ? ' ' // ? 'Exemplo&#58; MAKEhtm <NomeDohtm> /m/n' // QUIT ? ' ' numprg=&#123;&#125; numprg=Adir&#40;"*&#46;dbf"&#41; numopt=p1+p2+p3+p4+p5+p6+p7+p8+p9+p10 declare prg_files&#91;numprg&#93; Adir&#40;"*&#46;dbf",prg_files&#41; Asort&#40;prg_files&#41; endif // // -> Arquivo temporario iprg_files = 1 do while &#46;t&#46; if cFile = NIL prg_name &#58;= alltrim&#40;substr&#40;prg_files&#91;iprg_files&#93;,1,at&#40;"&#46;",prg_files&#91;iprg_files&#93;&#41;-1&#41;&#41; else prg_name &#58;= cFile endif ? 'Criando&#46;&#46;&#46; '+prg_name use &#40;prg_name&#41; copy structure extend to temp use use temp go top cFile &#58;= alltrim&#40;prg_name&#41; + "&#46;HTM" ret_line &#58;= "chr&#40;13&#41;+chr&#40;10&#41;" errhandle = fcreate&#40;cFile&#41; fwrite&#40;errhandle,&#91;<html>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;<body bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;<table border=0 cellpadding=0 cellspacing=0 valign="top" align="center" width="70%">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table width="100%" border="0" cellspacing="0" cellpadding="0">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="2" bgcolor="#FFFFFF" valign="center" align="center">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- START FORM HERE -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <form action="&#93;+prg_name+&#91;&#46;asp" method="POST" onSubmit="">&#93;+&ret_line&#46;&#41; //fwrite&#40;errhandle,&#91; <form action="&#93;+prg_name+&#91;&#46;asp" method="POST" onSubmit="">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="hidden" name="acao" value="inclusao">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="hidden" name="origem" value="IP">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- BR -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- p align="center" -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table border="0" cellpadding="2" cellspacing="1" width="600" bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#330066" align="center">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="2">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font color="#FFFFFF" size="4" face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <strong>Atenção&#58;</strong>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif">Contamos com sua atenção no preenchimento do formulário abaixo&#46;</font>&nbsp;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tbody> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- ------------- INICIO DO BLOCO DE CAMPOS ------------ -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table border="0" cellpadding="2" cellspacing="1" width="600" bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; do while &#46;not&#46; eof&#40;&#41; if field_type = 'L' &#46;or&#46; &#40;field_type = 'C' &#46;and&#46; field_len = 1&#41; // Cria controle checkbox fwrite&#40;errhandle,&#91; <tr bgcolor="#CCCCFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="135" align="right" bgcolor="#9999CC">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+NewCapfirst&#40;alltrim&#40;field_name&#41;&#41;+&#91;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="452">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input align=left maxlength="135" type="checkbox" name="&#93;+alltrim&#40;field_name&#41;+&#91;" size="1" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; skip loop endif if field_type = 'C' &#46;or&#46; field_type = 'N' // Cria controle text fwrite&#40;errhandle,&#91; <tr bgcolor="#CCCCFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="135" align="right" bgcolor="#9999CC">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+NewCapfirst&#40;alltrim&#40;field_name&#41;&#41;+&#91;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; if field_len > 45 // Cria controle textarea fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <textarea align=left rows="3" cols="50" maxlength="300" type="text" name="&#93;+alltrim&#40;field_name&#41;+&#91;" size="50" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;"></textarea>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; else fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input align=left maxlength="135" type="text" name="&#93;+alltrim&#40;field_name&#41;+&#91;" size="&#93;+str&#40;field_len,2&#41;+&#91;" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; endif fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; endif if field_type = 'M' // Cria controle textarea fwrite&#40;errhandle,&#91; <tr bgcolor="#CCCCFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="135" align="right" bgcolor="#9999CC">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">Nome</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <textarea align=left rows="3" cols="50" maxlength="300" type="text" name="&#93;+alltrim&#40;field_name&#41;+&#91;" size="50" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;"></textarea>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; endif skip enddo fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- ---------- INICIO DE PAGINA COMPLEMENTAR -------- -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table border="0" cellpadding="2" cellspacing="1" width="600" bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; /* fwrite&#40;errhandle,&#91; <tr bgcolor="#330066" align="center">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"><font face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <b><font color="#FFFFFF">Marque os tipos de informativos gostaria de receber em sua caixa de mensagem!</font></b></font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#CCCCFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="200"> <input type="checkbox" name="ezines" value="SB" > <font size="2" face="Arial, Helvetica, sans-serif">Produtos</font></td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="200"> <input type="checkbox" name="ezines" value="WP" > <font size="2" face="Arial, Helvetica, sans-serif">Servicos</font></td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="200"> <input type="checkbox" name="ezines" value="TR" > <font size="2" face="Arial, Helvetica, sans-serif">Internet</font></td></tr><tr bgcolor="#9999CC"> <td align="right" bgcolor="#330066" colspan="3"><img src="&#46;&#46;/imagens/spacer&#46;gif" width="3" height="3"></td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- ---------- INICIO DE BLOCO INFORMATIVO -------- -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#9999CC">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="checkbox" name="is_HTML_reader" value="Y" >&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">Gostaria de receber minhas mensagem atraves de minha area privativa no site&#46;<br>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="arial, helvetica" size="2" color="#660066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obs&#58; Somente para clientes cadastrados via site&#46;</font></font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; */ fwrite&#40;errhandle,&#91; <tr bgcolor="#9999CC"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="checkbox" name="is_HTML_reader" value="Y" checked>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">Pelo envio deste formulario quero garantir a atualizacao de meus dados nos cadastros SoftClever&#46;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#330066">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <div align="center"><b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><br>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; Clicando em '<b>Enviar formulario</b>!' seus dados serao armazenados em nossos cadastros on-line e uma saudacao lhe sera enviado o mais breve possivel&#46;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif"><br>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <p>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="submit" value=" Enviar formulario! " name="submit">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="reset" value=" Cancelar envio " name="reset">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </div>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </form>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- END FORM HERE -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;</table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;</html>&#93;+&ret_line&#46;&#41; fclose&#40;errhandle&#41; use if cFile = NIL iprg_files = iprg_files + 1 ? iprg_files else exit endif enddo RETURN FUNCTION NewCapFirst parameter string declare excesao&#91;7&#93; excesao&#91;1&#93; = " Do " excesao&#91;2&#93; = " Dos " excesao&#91;3&#93; = " Da " excesao&#91;4&#93; = " Das " excesao&#91;5&#93; = " De " excesao&#91;6&#93; = " E " excesao&#91;7&#93; = " Del " novotexto = space&#40;1&#41;+lower&#40;string&#41; fim = len&#40;string&#41; for i = 1 to fim if substr&#40;novotexto,i,1&#41; = " " novotexto = stuff&#40;novotexto,i+1,1,upper&#40;substr&#40;novotexto,i+1,1&#41;&#41;&#41; endif next tamanho = len&#40;excesao&#41; for i = 1 to tamanho if excesao&#91;i&#93;$novotexto && tamanho novotexto = stuff&#40;novotexto,AT&#40;excesao&#91;i&#93;,novotexto&#41;,; len&#40;excesao&#91;i&#93;&#41;,lower&#40;excesao&#91;i&#93;&#41;&#41; endif next RETURN&#40;ltrim&#40;novotexto&#41;&#41; [/code:1qn0il43] MakeASP <dbf_file> example: MakeASP clients MakeASP.PRG code: [code:1qn0il43] PARA cFile,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10 p1 &#58;= iif&#40;p1=NIL,"",p1&#41; p2 &#58;= iif&#40;p2=NIL,"",p2&#41; p3 &#58;= iif&#40;p3=NIL,"",p3&#41; p4 &#58;= iif&#40;p4=NIL,"",p4&#41; p5 &#58;= iif&#40;p5=NIL,"",p5&#41; p6 &#58;= iif&#40;p6=NIL,"",p6&#41; p7 &#58;= iif&#40;p7=NIL,"",p7&#41; p8 &#58;= iif&#40;p8=NIL,"",p8&#41; p9 &#58;= iif&#40;p9=NIL,"",p9&#41; p10 &#58;= iif&#40;p10=NIL,"",p10&#41; ? 'MAKEasp 1&#46;0 Direiros Reservados 1999-2000 Soft Clever Informatica ME&#46;' if cFile = NIL ? 'Uso &#58; MAKEasp <dbf_file> ' ? ' ' ? 'Exemplo&#58; MAKEasp <dbf_file>' QUIT endif ? ' ' //numprg=&#123;&#125; //numprg=Adir&#40;"*&#46;dbf"&#41; numopt=p1+p2+p3+p4+p5+p6+p7+p8+p9+p10 //declare prg_files&#91;numprg&#93; //Adir&#40;"*&#46;dbf",prg_files&#41; //Asort&#40;prg_files&#41; // // -> Arquivo temporario iprg_files = 1 //do while &#46;t&#46; prg_name &#58;= cFile //prg_name &#58;= alltrim&#40;substr&#40;prg_files&#91;iprg_files&#93;,1,at&#40;"&#46;",prg_files&#91;iprg_files&#93;&#41;-1&#41;&#41; ? 'Criando&#46;&#46;&#46; '+prg_name use &#40;prg_name&#41; copy structure extend to temp use use temp go top cFile &#58;= alltrim&#40;prg_name&#41; + "&#46;HTM" ret_line &#58;= "chr&#40;13&#41;+chr&#40;10&#41;" errhandle = fcreate&#40;cFile&#41; fwrite&#40;errhandle,&#91;<html>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;<body bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;<table border=0 cellpadding=0 cellspacing=0 valign="top" align="center" width="70%">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table width="100%" border="0" cellspacing="0" cellpadding="0">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="2" bgcolor="#FFFFFF" valign="center" align="center">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- START FORM HERE -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <form name="frm&#93;+NewCapFirst&#40;prg_name&#41;+&#91;" action="&#93;+prg_name+&#91;&#46;asp" method="POST" onSubmit="">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="hidden" name="acao" value="inclusao">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- BLOCO DE MANUTENCAO -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="hidden" name="origem" value="IP">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- BR -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- p align="center" -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table border="0" cellpadding="2" cellspacing="1" width="600" bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#386898" align="center">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="2">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font color="#FFFFFF" size="4" face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <strong>Atenção&#58;</strong>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif">Contamos com sua atenção no preenchimento do formulário abaixo&#46;</font>&nbsp;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tbody> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- ------------- INICIO DO BLOCO DE CAMPOS ------------ -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table border="0" cellpadding="2" cellspacing="1" width="600" bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; do while &#46;not&#46; eof&#40;&#41; if field_type = 'L' &#46;or&#46; &#40;field_type = 'C' &#46;and&#46; field_len = 1&#41; // Cria controle checkbox fwrite&#40;errhandle,&#91; <tr bgcolor="#E8F0FF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="135" align="right" bgcolor="#A8C8E8">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+NewCapfirst&#40;alltrim&#40;field_name&#41;&#41;+&#91;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="452">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input align=left maxlength="135" type="checkbox" name="&#93;+alltrim&#40;field_name&#41;+&#91;" size="1" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; skip loop endif /* if field_type = 'D' // Cria controle data fwrite&#40;errhandle,&#91; <tr bgcolor="#E8F0FF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td align="right" width="135" bgcolor="#A8C8E8">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+alltrim&#40;NewCapFirst&#40;field_name&#41;&#41;+&#91; <small>&#40;dd/mm/yy&#41;</small></font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="1"><small><br></small></font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <select name="DIA_&#93;+alltrim&#40;field_name&#41;+&#91;" size="1" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option selected value=""></option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="01">01</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="02">02</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="03">03</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="04">04</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="05">05</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="06">06</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="07">07</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="08">08</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="09">09</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="10">10</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="11">11</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="12">12</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="13">13</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="14">14</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="15">15</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="16">16</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="17">17</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="18">18</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="19">19</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="20">20</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="21">21</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="22">22</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="23">23</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="24">24</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="25">25</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="26">26</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="27">27</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="28">28</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="29">29</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="30">30</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="31">31</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </select>&nbsp;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <select name="MES_&#93;+alltrim&#40;field_name&#41;+&#91;" size="1" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option selected value=""></option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="01">Janeiro</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="02">Fevereiro</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="03">Marco</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="04">Abril</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="05">Maio</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="06">Junho</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="07">Julho</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="08">Agosto</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="09">Setembro</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="10">Outubro</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="11">Novembro</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="12">Dezembro</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </select>&nbsp;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <select name="ANO_&#93;+alltrim&#40;field_name&#41;+&#91;" size="1" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option selected value=""></option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="2000">2000</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="2001">2001</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="2002">2002</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <option value="2003">2003</option>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </select>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; endif */ if field_type = 'C' &#46;or&#46; field_type = 'N' &#46;or&#46; field_type = 'D' // Cria controle text fwrite&#40;errhandle,&#91; <tr bgcolor="#E8F0FF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="135" align="right" bgcolor="#A8C8E8">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+NewCapfirst&#40;alltrim&#40;field_name&#41;&#41;+&#91;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; if field_len > 45 // Cria controle textarea fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <textarea align=left rows="3" cols="50" maxlength="300" size="50" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;" type="text" name="&#93;+alltrim&#40;field_name&#41;+&#91;"></textarea>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; else fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input align=left maxlength="135" type="text" name="&#93;+alltrim&#40;field_name&#41;+&#91;" size="&#93;+str&#40;field_len,2&#41;+&#91;" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; endif fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; endif if field_type = 'M' // Cria controle textarea fwrite&#40;errhandle,&#91; <tr bgcolor="#E8F0FF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="135" valign="top" align="right" bgcolor="#A8C8E8">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+NewCapfirst&#40;alltrim&#40;field_name&#41;&#41;+&#91;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="452"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <textarea align=left rows="3" cols="50" maxlength="300" size="50" tabindex="&#93;+str&#40;recno&#40;&#41;,2&#41;+&#91;" type="text" name="&#93;+alltrim&#40;field_name&#41;+&#91;"></textarea>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; endif skip enddo fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- ---------- INICIO DE PAGINA COMPLEMENTAR -------- -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <table border="0" cellpadding="2" cellspacing="1" width="600" bgcolor="#FFFFFF">&#93;+&ret_line&#46;&#41; /* fwrite&#40;errhandle,&#91; <tr bgcolor="#330066" align="center">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"><font face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <b><font color="#FFFFFF">Marque os tipos de informativos gostaria de receber em sua caixa de mensagem!</font></b></font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#CCCCFF">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="200"> <input type="checkbox" name="ezines" value="SB" > <font size="2" face="Arial, Helvetica, sans-serif">Produtos</font></td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="200"> <input type="checkbox" name="ezines" value="WP" > <font size="2" face="Arial, Helvetica, sans-serif">Servicos</font></td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td width="200"> <input type="checkbox" name="ezines" value="TR" > <font size="2" face="Arial, Helvetica, sans-serif">Internet</font></td></tr><tr bgcolor="#9999CC"> <td align="right" bgcolor="#330066" colspan="3"><img src="&#46;&#46;/imagens/spacer&#46;gif" width="3" height="3"></td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- ---------- INICIO DE BLOCO INFORMATIVO -------- -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#9999CC">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="checkbox" name="is_HTML_reader" value="Y" >&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">Gostaria de receber minhas mensagem atraves de minha area privativa no site&#46;<br>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="arial, helvetica" size="2" color="#660066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obs&#58; Somente para clientes cadastrados via site&#46;</font></font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; */ fwrite&#40;errhandle,&#91; <tr bgcolor="#A8C8E8"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="checkbox" name="is_HTML_reader" value="Y" checked>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">Pelo envio deste formulario quero garantir a atualizacao de meus dados nos cadastros SoftClever&#46;</font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <tr bgcolor="#386898">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <td colspan="3"> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <div align="center"><b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><br>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; Clicando em '<b>Enviar formulario</b>!' seus dados serao armazenados em nossos cadastros on-line e uma saudacao lhe sera enviado o mais breve possivel&#46;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif"><br>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font size="2" face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <p>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="submit" value=" Enviar formulario! " name="submit" style="color&#58; #ffffff background-color&#58; #3399ff" onClick="javascript&#58;Cadastrar&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#40;&#41;">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <input type="reset" value=" Cancelar envio " name="reset" style="color&#58; #ffffff background-color&#58; #3399ff">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <font face="Arial, Helvetica, sans-serif">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </font>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </b>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </div>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <script language="javascript">&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; function Cadastrar&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#40;&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#123;&#93;+&ret_line&#46;&#41; go top do while &#46;not&#46; eof&#40;&#41; if field_type = 'N' fwrite&#40;errhandle,&#91; if &#40;isNaN&#40;document&#46;frm&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#46;&#93;+alltrim&#40;field_name&#41;+&#91;&#46;value&#41;&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#123;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; alert&#40;"O campo &#40;&#93;+alltrim&#40;field_name&#41;+&#91;&#41; deve ser numérico&#46;"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; document&#46;frm&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#46;&#93;+alltrim&#40;field_name&#41;+&#91;&#46;focus&#40;&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; return&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#125;&#93;+&ret_line&#46;&#41; endif if field_type = 'C' &#46;or&#46; field_type = 'M' fwrite&#40;errhandle,&#91; if &#40;document&#46;frm&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#46;&#93;+alltrim&#40;field_name&#41;+&#91;&#46;value == ""&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#123;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; alert&#40;"Favor informar o conteudo do campo &#40;&#93;+alltrim&#40;field_name&#41;+&#91;&#41;&#46;"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; document&#46;frm&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#46;&#93;+alltrim&#40;field_name&#41;+&#91;&#46;focus&#40;&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; return&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#125;&#93;+&ret_line&#46;&#41; endif skip enddo fwrite&#40;errhandle,&#91; document&#46;frm&#93;+alltrim&#40;NewCapFirst&#40;prg_name&#41;&#41;+&#91;&#46;submit&#40;&#41;;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#125;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </script>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </form>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; <!-- END FORM HERE -->&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </td> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </tr> &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; </table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;</table>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;</html>&#93;+&ret_line&#46;&#41; fclose&#40;errhandle&#41; cFile &#58;= alltrim&#40;prg_name&#41; + "&#46;ASP" ret_line &#58;= "chr&#40;13&#41;+chr&#40;10&#41;" errhandle = fcreate&#40;cFile&#41; fwrite&#40;errhandle,&#91;<table border=0 width=100%>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;<tr width=100%><td width=100% valign=top><h2>Cadastro de Cliente</h2></td></tr>&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;<% DIM acao,usuario_id, &#93;&#41; go top do while &#46;not&#46; eof&#40;&#41; fwrite&#40; errhandle,lower&#40;alltrim&#40;field_name&#41;&#41; &#41; skip if eof&#40;&#41; fwrite&#40;errhandle,&ret_line&#46;&#41; else fwrite&#40;errhandle,&#91;,&#93;&#41; endif enddo fwrite&#40;errhandle,&#91;'acao = Request&#46;QueryString&#40;"acao"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;acao = Request&#46;Form&#40;"acao"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;'Checa o preenchimento do formulário&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;If acao="inclusao" OR acao="atualizar" Then&#93;+&ret_line&#46;&#41; //fwrite&#40;errhandle,&#91; If acao="incluir" Then&#93;+&ret_line&#46;&#41; //fwrite&#40;errhandle,&#91; If &#40;Request&#46;Form&#40;"usuario"&#41; = ""&#41; Then erro = "XX" End If&#93;+&ret_line&#46;&#41; //fwrite&#40;errhandle,&#91; usuario = Request&#46;Form&#40;"usuario"&#41;&#93;+&ret_line&#46;&#41; //fwrite&#40;errhandle,&#91; End If&#93;+&ret_line&#46;&#41; go top do while &#46;not&#46; eof&#40;&#41; fwrite&#40;errhandle,&#91; If &#40;Request&#46;Form&#40;"&#93;+upper&#40;alltrim&#40;field_name&#41;&#41;+&#91;"&#41; = ""&#41; Then erro = "XX" End If&#93;+&ret_line&#46;&#41; skip enddo go top do while &#46;not&#46; eof&#40;&#41; fwrite&#40;errhandle,&#91; &#93;+lower&#40;field_name&#41;+&#91; = Request&#46;Form&#40;"&#93;+upper&#40;alltrim&#40;field_name&#41;&#41;+&#91;"&#41;&#93;+&ret_line&#46;&#41; skip enddo go top fwrite&#40;errhandle,&#91;End If&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;If erro = "XX" Then &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;"<script>"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;" alert&#40;'Por favor, preencha todas informações&#46;'&#41;"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;"</script>"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;End If&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;'Se há algum erro no formulário volta para edição&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;If erro = "XX" Then&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; Select Case acao&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; Case "atualizar"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; acao = "editar"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; Case "incluir"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; acao = ""&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; End Select&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;End If&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; &#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;'Inclui cliente&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;If acao = "inclusao" AND erro = "" Then&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; pos = instrrev&#40;lcase&#40;request&#46;servervariables&#40;"path_translated"&#41;&#41;,lcase&#40;scriptrelativefolder&#41; & "\" & lcase&#40;formaction&#41;&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; db_dir = left&#40;request&#46;servervariables&#40;"path_translated"&#41;, pos-1 &#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; db = db_dir & "\"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; set cnn= server&#46;createobject&#40;"adodb&#46;connection"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; cnn&#46;open "Driver=&#123;Microsoft dBase Driver &#40;*&#46;dbf&#41;&#125;;;DBQ=" & db & ";"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; cnn&#46;execute&#40;"INSERT INTO &#93;+alltrim&#40;prg_name&#41;+&#91;&#40;&#93;&#41; go top do while &#46;not&#46; eof&#40;&#41; fwrite&#40;errhandle,lower&#40;alltrim&#40;field_name&#41;&#41;&#41; skip if eof&#40;&#41; fwrite&#40;errhandle,&#91;&#41;" &_&#93;+&ret_line&#46;&#41; else fwrite&#40;errhandle,&#91;,&#93;&#41; endif enddo fwrite&#40;errhandle,&#91; "VALUES &#40;'"&_&#93;+&ret_line&#46;&#41; go top do while &#46;not&#46; eof&#40;&#41; fwrite&#40;errhandle,&#91; &#93;+upper&#40;alltrim&#40;field_name&#41;&#41;&#41; skip if eof&#40;&#41; fwrite&#40;errhandle,&#91;&"'&#41;" &#41;&#93;+&ret_line&#46;&#41; else fwrite&#40;errhandle,&#91;&"','"&_&#93;+&ret_line&#46;&#41; endif enddo fwrite&#40;errhandle,&#91; set cnn= nothing&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;"<script>"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;" alert&#40;'Operacao efetuada com sucesso!'&#41;"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;"</script>"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;End If&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;'Atualiza informações&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;If acao = "atualizar" Then&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; pos = instrrev&#40;lcase&#40;request&#46;servervariables&#40;"path_translated"&#41;&#41;,lcase&#40;scriptrelativefolder&#41; & "\" & lcase&#40;formaction&#41;&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; db_dir = left&#40;request&#46;servervariables&#40;"path_translated"&#41;, pos-1 &#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; db = db_dir & "\"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; set cnn= server&#46;createobject&#40;"adodb&#46;connection"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; cnn&#46;open "Driver=&#123;Microsoft dBase Driver &#40;*&#46;dbf&#41;&#125;;;DBQ=" & db & ";"&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; cnn&#46;execute&#40;"UPDATE &#93;+alltrim&#40;prg_name&#41;+&#91; set " &_&#93;+&ret_line&#46;&#41; go top do while &#46;not&#46; eof&#40;&#41; fwrite&#40;errhandle,&#91; "&#93;+lower&#40;alltrim&#40;field_name&#41;&#41;+&#91;='&#93;+lower&#40;alltrim&#40;field_name&#41;&#41;+&#91;'&#93;&#41; skip if eof&#40;&#41; fwrite&#40;errhandle,&#91; WHERE id=" & Session&#40;"usuario_id"&#41;&#41;&#93;+&ret_line&#46;&#41; //fwrite&#40;errhandle,&#91; WHERE id=" & Session&#40;"usuario_id"&#41;&#41;&#93;+&ret_line&#46;&#41; else fwrite&#40;errhandle,&#91;" &_&#93;+&ret_line&#46;&#41; endif enddo fwrite&#40;errhandle,&#91; set cnn= nothing&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;"<script>"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;" alert&#40;'Atualizacao efetuada com sucesso!'&#41;"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91; response&#46;write &#40;"</script>"&#41;&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;End If&#93;+&ret_line&#46;&#41; fwrite&#40;errhandle,&#91;%>&#93;+&ret_line&#46;&#41; fclose&#40;errhandle&#41; use RETURN [/code:1qn0il43]Put the .HTM and .ASP in your server and test.This is the begining.Download all files in <!-- m --><a class="postlink" href="http://www.5volution.com/downloads/makehtm.zip">http://www.5volution.com/downloads/makehtm.zip</a><!-- m -->
ASSISTANCE NEEDED - Dual xbrowse header
Using xBrowse, I'm trying to use a type of Gannt chart for a calendar. Please look at the sample and you will see the problem with the display. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> I want the day on the top header, and the hours below. The top header should cover the range of hours ( 8 - 5 ) for the day. So hour 8 is header type 2, 9 to 4 are header type 1, and 5 is header type 3. This repeats. Of course the setup is done with the appropriate columns. Note that the 5 is using a characteristic of type 0, not 3, and the header stops before the end of the 4. This is the result I get: [img:u2sxko2m]http&#58;//www&#46;masterlinksoftware&#46;com/Files/CalSample&#46;jpg[/img:u2sxko2m] Here is the code: oCalW:nHeader := 1 oCalW:aHeaderTop := {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"} oCalW:aCols[ 1 ]:nHeaderType := 0 oCalW:aCols[ 2 ]:nHeaderType := 2 FOR mbx := 3 TO 10 oCalW:aCols[ mbx]:nHeaderType := 1 NEXT oCalW:aCols[ 11]:nHeaderType := 3 oCalW:aCols[ 12]:nHeaderType := 2 FOR mbx := 13 TO 20 oCalW:aCols[ mbx]:nHeaderType := 1 NEXT oCalW:aCols[ 21]:nHeaderType := 3 oCalW:aCols[ 22]:nHeaderType := 2 FOR mbx := 23 TO 30 oCalW:aCols[ mbx]:nHeaderType := 1 NEXT oCalW:aCols[ 31]:nHeaderType := 3 oCalW:aCols[ 32]:nHeaderType := 2 FOR mbx := 33 TO 40 oCalW:aCols[ mbx]:nHeaderType := 1 NEXT oCalW:aCols[ 41]:nHeaderType := 3 oCalW:aCols[ 42]:nHeaderType := 2 FOR mbx := 43 TO 50 oCalW:aCols[ mbx]:nHeaderType := 1 NEXT oCalW:aCols[ 51]:nHeaderType := 3 Any ideas ?
ASSISTANCE NEEDED - Dual xbrowse header
Tim, Could you please "paint" (mspaint) the result that you would like to get and post it here ? thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ASSISTANCE NEEDED - Dual xbrowse header
Tim, Sorry for the delay but I was for a few days out of the office. Fortunatly our dear friend and master, Rao, managed to provide you a solution <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ASSISTANCE NEEDED - Dual xbrowse header
Antonio, I think it is supposed to look like this: [url=http&#58;//img519&#46;imageshack&#46;us/i/xbrowseheader&#46;jpg/:1pjbtgeu][img:1pjbtgeu]http&#58;//img519&#46;imageshack&#46;us/img519/7708/xbrowseheader&#46;jpg[/img:1pjbtgeu][/url:1pjbtgeu] Regards, James
ASSISTANCE NEEDED - Dual xbrowse header
Antonio, James did it ( looking at the adjustment for Monday display ). The numbers are the hours of the day, from 8 to 5, and so the top header Monday should cover all of those hours. I believe I implemented the code correctly, but the display is off. Of course it needs to display correctly for all 5 days, Monday through Friday. Thanks ...
ASSISTANCE NEEDED - Dual xbrowse header
I showed a current display of the top header, and James showed a visual of how it should look, but after a week, doesn't anyone have an idea what is wrong here ? I would sure love to fix this ... it looks pretty bad. Thanks.
ASSISTANCE NEEDED - Dual xbrowse header
Tim If you send me a sample of it I can see what Multiheader make and where is the error
ASSISTANCE NEEDED - Dual xbrowse header
The code is in the original message at the top of this thread.
ASSISTANCE NEEDED - Dual xbrowse header
i CANNOT COMPILED IT
ASSISTANCE NEEDED - Dual xbrowse header
Silvio, It is not possible to post all of the code that leads to this. I assumed others use the top header option in Xbrowse and would look at the implementation above and see what is wrong, or have experienced something similar. Apparently either no one is using Top Header, or there is something unique here. From the documentation and sample, what I posted should be correct ...but it doesn't display correctly. Tim
ASSISTANCE NEEDED - Dual xbrowse header
you can post a small sample test to see the problem
ASSISTANCE NEEDED - Dual xbrowse header
Please search for this code in the METHOD Paint() in XBrowse.Prg [code=fw:1anuditk]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ElseIf oCol:<span style="color: #000000;">nHeaderType</span>==<span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, nCol - <span style="color: #000000;">2</span>, nRow + <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, nCol - <span style="color: #000000;">2</span>, nRow + nHeight - <span style="color: #000000;">0</span>, hHeaderPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">PaintHeader</span><span style="color: #000000;">&#40;</span> nRow , nCol<span style="color: #000000;">-1</span>, nHeight,,,oCol:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+1</span>, oCol:<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, nColIni - <span style="color: #000000;">2</span>, nRow + nHeight/<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, nCol - <span style="color: #000000;">2</span>, nRow + nHeight/<span style="color: #000000;">2</span>, hHeaderPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nHeaderTop++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">PaintHeader</span><span style="color: #000000;">&#40;</span> nRow - <span style="color: #000000;">0</span>, nColIni<span style="color: #000000;">-1</span>, nHeight/<span style="color: #000000;">2</span>,,,nWidthHeaderTop<span style="color: #000000;">+1</span>, ::<span style="color: #000000;">aHeaderTop</span><span style="color: #000000;">&#91;</span>nHeaderTop<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nWidthHeaderTop:=<span style="color: #000000;">0</span><br />&nbsp;</div>[/code:1anuditk] Please replace the entire block above with the code given below [code=fw:1anuditk]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ElseIf oCol:<span style="color: #000000;">nHeaderType</span>==<span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, nCol - <span style="color: #000000;">2</span>, nRow + <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, nCol - <span style="color: #000000;">2</span>, nRow + nHeight - <span style="color: #000000;">0</span>, hHeaderPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">PaintHeader</span><span style="color: #000000;">&#40;</span> nRow + nHeight/<span style="color: #000000;">2</span>, nCol<span style="color: #000000;">-1</span>, nHeight/<span style="color: #000000;">2</span>,,,oCol:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+1</span>, oCol:<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nWidthHeaderTop += oCol:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, nColIni - <span style="color: #000000;">2</span>, nRow + nHeight/<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, nColIni - <span style="color: #000000;">2</span> + nWidthHeaderTop, nRow + nHeight/<span style="color: #000000;">2</span>, hHeaderPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nHeaderTop++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">PaintHeader</span><span style="color: #000000;">&#40;</span> nRow - <span style="color: #000000;">0</span>, nColIni<span style="color: #000000;">-1</span>, nHeight/<span style="color: #000000;">2</span>,,,nWidthHeaderTop<span style="color: #000000;">+1</span>, ::<span style="color: #000000;">aHeaderTop</span><span style="color: #000000;">&#91;</span>nHeaderTop<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nWidthHeaderTop:=<span style="color: #000000;">0</span><br />&nbsp;</div>[/code:1anuditk] Now the headers should work as expected.
ASSISTANCE NEEDED - Dual xbrowse header
Mr Silvio Can you please clarify what for is nHeaderType == 4 ? Documentation describes nHeaderType 1, 2 and 3 only but not 4.
ASSISTANCE NEEDED - Dual xbrowse header
Nas, 4 is to close ( sum 3+1 =4) see the testhead.prg [b:zo9dqy9e] xColBrw[03] := { "Street", AL_CENTER, .T., 70, AL_LEFT, "@30", 1, { |o| (oBrw:cAlias)->STREET }, { || (oBrw:cAlias)->STREET }, 4, AL_RIGHT }[/b:zo9dqy9e]
ASSISTANCE NEEDED - Dual xbrowse header
Thank you. That takes care of the 5 displaying as a status 1 ( full height ), but the top bar still does not extend fully to the right of the last column it covers. It appears to be about 1/3 of the way across the column. You can see this in the sample above where it covers only part of the column with the number 4. At least this looks better. Thanks for the edit.
ASSISTANCE NEEDED - Dual xbrowse header
Tim, We have totally replaced the group header implementation in Class TXBrowse. We will publish the new changes in next FWH 9.12 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ASSISTANCE NEEDED - Dual xbrowse header
Antonio, Perhaps I not understand which is the problem !!
ASSISTANCE NEEDED - Dual xbrowse header
Silvio, We will provide a complete explanation in a day or two, when we publish FWH 9.12 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ASSISTANCE NEEDED - Dual xbrowse header
Downloaded FWH 9.12. The new syntax for setting group headers is : oBrw:SetGroupHeader( cGroupHeader, [nFromCol], [nUptoCol], [oFont] ) In the above example, the group headers can be set with the following code: [code=fw:2d2bem5z]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">4</span><br />      oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span> NtoCDoW<span style="color: #000000;">&#40;</span> n + <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, n * <span style="color: #000000;">9</span> + <span style="color: #000000;">2</span>, n * <span style="color: #000000;">9</span> + <span style="color: #000000;">10</span>, oBold <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// font is optional</span><br />   <span style="color: #00C800;">next</span><br /> </div>[/code:2d2bem5z] The original examples, with similar gradient colors, could look like this: [url=http&#58;//img46&#46;imageshack&#46;us/my&#46;php?image=timv&#46;jpg:2d2bem5z][img:2d2bem5z]http&#58;//img46&#46;imageshack&#46;us/img46/3006/timv&#46;jpg[/img:2d2bem5z][/url:2d2bem5z]
ASave() que tipo de valor retorna
Tengo una aplicación que utilíza muchos archivos que graban arrays en disco con esta función. Estoy portandolo a MySQL y me gustaría guardar estos arrays en el motor. Si verifico el tipo de dato que devuelve ASave() con type() o ValType() me devuelven "U", pero abrá en MySQL algún tipo de dato que lo soporte ??. Alguien sabe..., Gracias de antemano
ASave() que tipo de valor retorna
Horacio [url:3dppw5c4]http&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=fivewin_funcion_asave[/url:3dppw5c4] retorna una cadena este es un a ejmeplo (tomado tambien del wiki de fivewin) [code=fw:3dppw5c4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /> <br /><span style="color: #B900B9;">//------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> aData1,aData2,cBinData<br /> <br />   aData1:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Tom"</span>,<span style="color: #ff0000;">"Dickenson"</span>,<span style="color: #ff0000;">"Harry"</span><span style="color: #000000;">&#125;</span><br />   cBinData:=ASave<span style="color: #000000;">&#40;</span>aData1<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// Converts Array Data and to Binary and stores in cStr</span><br /><br />   ? ValType<span style="color: #000000;">&#40;</span> cBinData <span style="color: #000000;">&#41;</span><br /> <br />   aData2:=ARead<span style="color: #000000;">&#40;</span>cBinData<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// Reads data from Binary and then converts back to Array</span><br />   MsgList<span style="color: #000000;">&#40;</span>aData2<span style="color: #000000;">&#41;</span><br />   <br /> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3dppw5c4]
ASave() que tipo de valor retorna
Horacio, a lo mejor te interesa cambiar ASave() por ValToPrg()
ASave() que tipo de valor retorna
Esta es una version viejita de la funcion Val2PrgExp incluida con xharbour, uso esta viejita y no la version actual por alguna razon de peso que no recuedo ahora si recuerdo que me toco buscar por muchos lugares para buscar esta version en particular, encontrandola en el cvs. [code=fw:2vkpqb6h]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #B900B9;">//guardar en campo memo DESGLOSC un arreglo </span><br />&nbsp; &nbsp;aDesgC := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"100"</span>,<span style="color: #000000;">15</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"50"</span>,<span style="color: #000000;">10</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"20"</span>,<span style="color: #000000;">7</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"10"</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"5"</span>,<span style="color: #000000;">8</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"1"</span>,<span style="color: #000000;">12</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;CAJA->DESGLOSC := Val2PrgExp<span style="color: #000000;">&#40;</span> aDesgC <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #B900B9;">//recuperar</span><br />&nbsp; aDesgC := <span style="color: #00C800;">NIL</span><br />&nbsp; aDesgC := &<span style="color: #000000;">&#40;</span> CAJA->DESGLOSC <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//precompila el arreglo contenido en el campo memo</span><br />&nbsp; ?valtype<span style="color: #000000;">&#40;</span>aDesgC<span style="color: #000000;">&#41;</span>, len<span style="color: #000000;">&#40;</span>aDesgC<span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:2vkpqb6h] [code=fw:2vkpqb6h]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> Val2PrgExp<span style="color: #000000;">&#40;</span> xVal <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> cType := ValType<span style="color: #000000;">&#40;</span> xVal <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> aVar, cRet<br /><br />   <span style="color: #00C800;">SWITCH</span> cType<br /><br />   <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">'C'</span><br />      <span style="color: #00C800;">IF</span> ! <span style="color: #ff0000;">'"'</span> IN xVal<br />         <span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">'"'</span> + xVal + <span style="color: #ff0000;">'"'</span><br />      ELSEIF ! <span style="color: #ff0000;">"'"</span> IN xVal<br />         <span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">"'"</span> + xVal + <span style="color: #ff0000;">"'"</span><br />      ELSEIF <span style="color: #000000;">&#40;</span> ! <span style="color: #ff0000;">"["</span> IN xVal <span style="color: #000000;">&#41;</span> .AND. <span style="color: #000000;">&#40;</span> ! <span style="color: #ff0000;">"]"</span> IN xVal <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">"["</span> + xVal + <span style="color: #ff0000;">"]"</span><br />      <span style="color: #00C800;">ELSE</span><br />         <span style="color: #00C800;">Throw</span><span style="color: #000000;">&#40;</span> ErrorNew<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CSTR"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3102</span>, ProcName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"Can't stringify"</span>, <span style="color: #000000;">&#123;</span> xVal <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         EXIT<br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">'D'</span><br />      <span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">"sToD( '"</span> + dToS<span style="color: #000000;">&#40;</span> xVal <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"' )"</span><br /><br />   <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">'L'</span><br />      <span style="color: #00C800;">RETURN</span> IIF<span style="color: #000000;">&#40;</span> xVal, <span style="color: #ff0000;">".T."</span>, <span style="color: #ff0000;">".F."</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">'N'</span><br />      <span style="color: #00C800;">RETURN</span> Ltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> xVal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">'A'</span><br />      cRet := <span style="color: #ff0000;">"{ "</span><br />      <span style="color: #00C800;">FOR</span> EACH aVar IN xVal<br />         cRet += <span style="color: #000000;">&#40;</span> Val2PrgExp<span style="color: #000000;">&#40;</span> aVar <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">", "</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">NEXT</span><br />      <span style="color: #00C800;">IF</span> cRet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">-2</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">','</span><br />         cRet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">-2</span> <span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">' '</span><br />      <span style="color: #00C800;">ENDIF</span><br />      cRet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">'}'</span><br />      <span style="color: #00C800;">RETURN</span> cRet<br />   <span style="color: #00C800;">DEFAULT</span><br />      <span style="color: #00C800;">IF</span> xVal == <span style="color: #00C800;">NIL</span><br />         cRet := <span style="color: #ff0000;">"NIL"</span><br />      <span style="color: #00C800;">ELSE</span><br />         <span style="color: #00C800;">Throw</span><span style="color: #000000;">&#40;</span> ErrorNew<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"VALTOPRG"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3103</span>, ProcName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"Tipo no soportado"</span>, <span style="color: #000000;">&#123;</span> xVal <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   END<br /><br /><span style="color: #00C800;">RETURN</span> cRet<br /> </div>[/code:2vkpqb6h]
AScan() o AT()
Hola a todos, Sabría alguién decirme que es más efeciente, si usar AScan() para encontrar un elemento en una array unidimensional, o usar AT() en una cadena (que contiene valores concatenados)? Para la cantidad de valores que hasta ahora manejaba me daba igual, pero quizás se incremente hasta 1.000.000 de valores; y eso ya es otra cosa. Los valores a buscar son cadenas de hasta 20 posiciones. No estoy pensando meterlo en una BBDD por que serán valores que se agruparan dinámicamente según la consulta que realice el usuario, pero no lo descarto. Muchas gracias,
AScan() o AT()
Estimado Carlos, La función At() está basada en código en C que aprovecha directamente capacidades innatas de la CPU. Es decir, la CPU esta diseñada por el fabricante para encontrar subcadenas de la forma más eficiente posible y este poder lo tienes directamente a tu alcance usando At(). Es por esto que no existe nada más rápido que At() para encontrar una subcadena, que es un grupo de bytes dentro de un grupo de bytes mayor.
AScan() o AT()
[quote="Antonio Linares":3hz4vdj5]Estimado Carlos, La función At() está basada en código en C que aprovecha directamente capacidades innatas de la CPU. Es decir, la CPU esta diseñada por el fabricante para encontrar subcadenas de la forma más eficiente posible y este poder lo tienes directamente a tu alcance usando At(). Es por esto que no existe nada más rápido que At() para encontrar una subcadena, que es un grupo de bytes dentro de un grupo de bytes mayor.[/quote:3hz4vdj5] Muchas gracias Antonio; no recordaba este detalle.
ASort
Hola. La idea de este codigo es que dada un array lo ordene por fecha de cada "grupo" de "nIdPadre", si lo pueden ejecutar van a ver que la primera vez ordena bien para los nIdPadre == 0, pero despues toma bien desde donde tiene que comenzar "nInicio" dado por el nIdPadre pero calcula mal hasta donde tiene que ordenar, el "nFInal" me pasó lo mismo con un codigo anterior similar a esto usando aScan, no se si son por los => o que. Podrian ayudarme? [code=fw:1x1h8ifw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> prueba<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> aDatos := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">LOCAL</span> nInicio, nFinal<br /><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"01/8/1020"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"01/8/1011"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"03/7/1008"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"06/8/1020"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"01/10/2220"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">4</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"15/8/1008"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">5</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"10/8/2025"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   nInicio := <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br />      nFinal := AScan<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> | xCelda | xCelda<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nIdPadre"</span> <span style="color: #000000;">&#93;</span> != aDatos<span style="color: #000000;">&#91;</span> nInicio <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nIdPadre"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />      XBROWSER aDatos<br /><br />      aDatos := ASort<span style="color: #000000;">&#40;</span> aDatos, nInicio, nFinal - <span style="color: #000000;">1</span>, <span style="color: #000000;">&#123;</span> | x, y | CToD<span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"dFecha"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> < CToD<span style="color: #000000;">&#40;</span> y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"dFecha"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />      XBROWSER aDatos <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"desde: "</span> + Str<span style="color: #000000;">&#40;</span>nInicio<span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" hasta: "</span> + Str<span style="color: #000000;">&#40;</span>nFinal<span style="color: #000000;">&#41;</span><br />      nInicio := nFinal<br />   <span style="color: #00C800;">ENDDO</span><br /><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:1x1h8ifw] Gracias
ASort
nada aun?
ASort
Querido Gustavo, Aqui lo tienes: (lo he desordenado más aún para que se vea que funciona). Primero ordeno por nIdPadre y luego ordeno por fechas para padres iguales [code=fw:2eb1bru2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> aDatos := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span><br /><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"06/8/1020"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"01/8/1020"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"03/7/1008"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">5</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"10/8/2025"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"01/10/2220"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"01/8/1011"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"a"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nId"</span> => <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"nIdPadre"</span> => <span style="color: #000000;">4</span>, <span style="color: #ff0000;">"dFecha"</span> => <span style="color: #ff0000;">"15/8/1008"</span>, <span style="color: #ff0000;">"nHitem"</span> => <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   aDatos = ASort<span style="color: #000000;">&#40;</span> aDatos,,, <span style="color: #000000;">&#123;</span> | x, y | x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nIdPadre"</span> <span style="color: #000000;">&#93;</span> < y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nIdPadre"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   aDatos = ASort<span style="color: #000000;">&#40;</span> aDatos,,, <span style="color: #000000;">&#123;</span> | x, y | x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nIdPadre"</span> <span style="color: #000000;">&#93;</span> == y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nIdPadre"</span> <span style="color: #000000;">&#93;</span> .and. ;<br />                                        CToD<span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"dFecha"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> < CToD<span style="color: #000000;">&#40;</span> y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"dFecha"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   XBROWSER aDatos<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2eb1bru2]