topic
stringlengths
1
63
text
stringlengths
1
577k
Controlling the SIP (Soft Input Panel)
[quote="Bill Simmeth":ai1rcn7a]Antonio, thanks! I missed the announcement about these functions. Works great![/quote:ai1rcn7a] Cool <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> [quote="Bill Simmeth":ai1rcn7a] Does this mean that dynamic DLL function calls are not fully working? This might explain a different issue I am having. [/quote:ai1rcn7a] Yes, they are not ready yet. Please use to review whatsnew.txt file included with FWPPC. We will announce it as soon as it is fully available.
Controllo pulsante (non so il nome!) :-(
Ciao a tutti, scrivo per chiederVi se esiste un controllo tipo btnbmp ma che rimane schiacciato. Mi spiego meglio, in pratica tipo il pulsante qui sotto: [url=http&#58;//img444&#46;imageshack&#46;us/my&#46;php?image=immagineff9&#46;jpg:157x9vmy][img:157x9vmy]http&#58;//img444&#46;imageshack&#46;us/img444/7636/immagineff9&#46;th&#46;jpg[/img:157x9vmy][/url:157x9vmy] [url=http&#58;//img444&#46;imageshack&#46;us/my&#46;php?image=immagineff9&#46;jpg:157x9vmy][img=http://img444.imageshack.us/img444/7636/immagineff9.th.jpg][/url:157x9vmy] dovrei fare questo lavoro: dalla posizione 1 se lo premo, in posizione 2 apre una dialog, se lo ripremo ritorna alla posizione 1 e chiude la dialog! Magari c'è un altro controllo ma non saprei, avete un suggerimento? Grazie.
Controllo pulsante (non so il nome!) :-(
TBtnBmp metodi GoUp() e GoDown() EMG
Controllo pulsante (non so il nome!) :-(
[quote="EnricoMaria":3re6nx81]TBtnBmp metodi GoUp() e GoDown()[/quote:3re6nx81] Ciao Enrico, mai usati <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> ho provato a guardare tra i samples senza trovare nulla... hai un esempio da inviarmi? Grazie.
Controllo pulsante (non so il nome!) :-(
No, ma è molto semplice: oBtn:GoDown() mette il pulsante nello stato premuto e oBtn:GoUp() nello stato non premuto. EMG
Controllo pulsante (non so il nome!) :-(
[quote="EnricoMaria":2rhrg19t]No, ma è molto semplice: oBtn:GoDown() mette il pulsante nello stato premuto e oBtn:GoUp() nello stato non premuto.[/quote:2rhrg19t] Grazie Enrico, ho capito.
Controls alignment bug
The following sample shows that SAYs and GETs don't get aligned throughout the display: [code:it70dauw]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd LOCAL cVar1 &#58;= SPACE&#40; 20 &#41; LOCAL cVar2 &#58;= SPACE&#40; 20 &#41; DEFINE WINDOW oWnd @ 1, 1 SAY "Name 1&#58;"; SIZE 70, 20 @ 1, 10 GET cVar1; SIZE 70, 20 @ 5, 1 SAY "Name 2&#58;"; SIZE 70, 20 @ 5, 10 GET cVar2; SIZE 70, 20 ACTIVATE WINDOW oWnd RETURN NIL[/code:it70dauw] EMG
Controls alignment bug
Enrico, Yes, thats normal in FW, as we calculate each row based on the control height. With this little modification it shows ok: [code:29r08s22] @ 5&#46;7, 10 GET cVar2; SIZE 70, 20 [/code:29r08s22]
Controls alignment bug
Unfortunately it is not linear: [code:1jdme3ny]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd LOCAL cVar1 &#58;= SPACE&#40; 20 &#41; LOCAL cVar2 &#58;= SPACE&#40; 20 &#41; LOCAL cVar3 &#58;= SPACE&#40; 20 &#41; DEFINE WINDOW oWnd @ 1, 1 SAY "Name 1&#58;"; SIZE 70, 20 @ 1, 10 GET cVar1; SIZE 70, 20 @ 5, 1 SAY "Name 2&#58;"; SIZE 70, 20 @ 5&#46;7, 10 GET cVar2; SIZE 70, 20 @ 10, 1 SAY "Name 3&#58;"; SIZE 70, 20 @ 10&#46;7, 10 GET cVar3; SIZE 70, 20 ACTIVATE WINDOW oWnd RETURN NIL[/code:1jdme3ny] Any workaround other than using a calculation? EMG
Controls alignment bug
Enrico, The only solution is to modify include\constant.ch and recompile all PRG classes.
Controls alignment bug
Is it something that you can change in the standard FWPPC build? EMG
Controls alignment bug
Enrico, We may modify it here, but we have to decide, all together, what values to use. Should the SAYs be the reference ? the GETs ?
Controls alignment bug
Ok, let me do some experiment... EMG
Controls alignment bug
[quote="Antonio Linares":s1nftlyd]Enrico, We may modify it here, but we have to decide, all together, what values to use. Should the SAYs be the reference ? the GETs ?[/quote:s1nftlyd] I think that we don't have to care what controls should be the reference. We just need that row "n" is the same for all the controls. Don't you agree? EMG
Controls alignment bug
Enrico, Yes, thats a solution, but still we have to decide the value for each row and column.
Controls alignment bug
GETs could be a good reference as they are the most used controls. I think that now is the right time for this fix due to the little backward compatibility problems. After it would be late exactly like for Fivewin. EMG
Controls are not working when window is child of an MDI.
Hi, I am facing some problems with CHILD window of an MDI. whereas the same controls are working fine with DIALOG window without any code changes. for example, following Controls are not working when window is child of an MDI but they works very well with DIALOG window 1. GET CONTROL WITH ARRAY VARIABLE e.g. @10,10 get aoGET[1] VAR aAcctInfo[1] 2. ANY COMBOBOX 3. COLOR clause not working to Child window. 4. Bitmap Button. Please correct me if I worng. Thanks Shridhar
Controls are not working when window is child of an MDI.
Dear Shridhar, The below given code is working fine for me. I have used arrays to hold Get objects, Combobox and Colors [code=fw:29l57k7e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><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 /><br />    <span style="color: #00C800;">Local</span> oWnd<br />    <br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">MDI</span><br />        oWnd:<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// To remove the MDI menus</span><br />    <br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span><br /><br /><span style="color: #B900B9;">//----------------------//</span><br /><span style="color: #00C800;">Function</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">Local</span> oWnd,oSay1,oSay2,aGetObject<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aGetValues<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,oCombo,cCombo := <span style="color: #ff0000;">"2"</span><br />    <span style="color: #00C800;">Local</span> aItems := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">"2"</span>, <span style="color: #ff0000;">"3"</span> <span style="color: #000000;">&#125;</span><br />    <br />    aGetValues<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:=<span style="color: #000000;">0</span><br />    aGetValues<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">160</span><span style="color: #000000;">&#41;</span><br />    <br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test SMS"</span> ;<br />           <span style="color: #0000ff;">COLOR</span> CLR_BLACK, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">213</span>,<span style="color: #000000;">228</span>,<span style="color: #000000;">242</span><span style="color: #000000;">&#41;</span><br />                  <br />    @<span style="color: #000000;">0.5</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">SAY</span> oSay1 <span style="color: #0000ff;">Prompt</span> <span style="color: #ff0000;">"Mob.No"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">213</span>,<span style="color: #000000;">228</span>,<span style="color: #000000;">242</span><span style="color: #000000;">&#41;</span><br />    @<span style="color: #000000;">0.7</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> aGetObject<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> aGetValues<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <br />    <br />    @<span style="color: #000000;">2.5</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"SMS Text"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">COLOR</span> CLR_BLACK, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">213</span>,<span style="color: #000000;">228</span>,<span style="color: #000000;">242</span><span style="color: #000000;">&#41;</span><br />    @<span style="color: #000000;">3</span>,<span style="color: #000000;">10</span>  <span style="color: #0000ff;">GET</span> aGetObject<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> aGetValues<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> MEMO <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">60</span><br />    <br />     @<span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo <span style="color: #0000ff;">VAR</span> cCombo <span style="color: #0000ff;">ITEMS</span> aItems <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">100</span><br />    <br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd  <br /><span style="color: #00C800;">Return</span></div>[/code:29l57k7e] [url=http&#58;//img831&#46;imageshack&#46;us/i/testmdi&#46;jpg/:29l57k7e][img:29l57k7e]http&#58;//img831&#46;imageshack&#46;us/img831/8445/testmdi&#46;jpg[/img:29l57k7e][/url:29l57k7e] Regards Anser
Controls are not working when window is child of an MDI.
Hi Anser, I am getting memory errors. Is there any environment issues ? Tomorrow I will post error screen shots. So I can get more information from you. FYI...! I am using Windows XP and xMate, Broland C++, FWH 9.11 Thanks a lot...! for your kind support. Shridhar
Controls are not working when window is child of an MDI.
Hi Shridhar, [quote:1gu531ww]Is there any environment issues ? [/quote:1gu531ww] I dont think so. Did you try to compile and run the sample which I have posted above using the BuildX.bat or BuildH.Bat ? Regards Anser
Controls automatic alignments
This is a sample showing how to automatize the alignment of source-code-defined controls: [code:145977s8]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd LOCAL cli &#58;= SPACE&#40; 35 &#41; LOCAL ind &#58;= SPACE&#40; 35 &#41; DEFINE WINDOW oWnd; TITLE "Test" @ 1, 0 SAY "Cliente&#58;" @ 1, 7 COMBOBOX cli; SIZE 100, 20 @ 1, 28 BUTTON "Test1"; SIZE 45, 20 @ 2, 0 BUTTON "Nuovo"; SIZE 50, 20 @ 2, 9 BUTTON "Cambia"; SIZE 50, 20 @ 2, 18 BUTTON "Chiudi"; SIZE 50, 20 @ 2, 27 BUTTON "Svuota"; SIZE 50, 20 @ 2, 36 BUTTON "C"; SIZE 24, 20 @ 3, 0 LISTBOX FIELDS; SIZE 240, 125 @ 9, 0 SAY "Indirizzo&#58;" @ 9, 7 COMBOBOX Ind; SIZE 100, 20 @ 9, 28 BUTTON "Test2"; SIZE 45, 20 @ 12, 0 SAY "Indirizzo&#58;" @ 12, 7 COMBOBOX Ind; SIZE 100, 20 @ 12, 28 BUTTON "Test2"; SIZE 45, 20 ACTIVATE WINDOW oWnd; ON INIT ADJCTRLS&#40; oWnd &#41; RETURN NIL STATIC FUNCTION ADJCTRLS&#40; oWnd &#41; LOCAL oCtl, nTop, nHeight LOCAL i IF EMPTY&#40; oWnd&#58;aControls &#41;; RETURN NIL; ENDIF FOR i = 1 TO LEN&#40; oWnd&#58;aControls &#41; oCtl = oWnd&#58;aControls&#91; i &#93; nTop = &#40; oCtl&#58;nTop - 11 &#41; * 1&#46;41 nHeight = oCtl&#58;nHeight DO CASE CASE oCtl&#58;ClassName = "TBUTTON" nTop = &#40; nTop - 4 &#41; * 0&#46;83 nHeight *= 0&#46;96 CASE oCtl&#58;ClassName = "TCOMBOBOX" nTop = &#40; nTop - 1 &#41; * 1&#46;07 CASE oCtl&#58;ClassName = "TGET" nTop *= 1&#46;15 CASE oCtl&#58;ClassName = "TSAY" nTop -= 2 CASE oCtl&#58;ClassName = "TWBROWSE" nTop *= 1&#46;07 ENDCASE oCtl&#58;Move&#40; nTop, oCtl&#58;nLeft, oCtl&#58;nWidth, nHeight &#41; NEXT RETURN NIL[/code:145977s8] EMG
Controls automatic alignments
Enrico, Thanks
Controls in Listbox
Is it possible to use controls within listboxes? specifically I would like to use a checkbox for logical fields. I saw a Q&A on TWBrowse + Checkboxes, but alas I don't read Espanol. Greg
Controls in Listbox
Greg, You have to use a trick to make it appear like it is a control. Below is a copy of my notes on this. James ---------------------------- Here is how to do a checkbox in a listbox: You need to use two bimaps for the checkbox, one checked and one unchecked. Load the bitmaps: hChecked:=loadbitmap( getresources(),"checked") hUnchecked:= loadbitmap( getrources(),"unchecked") Define the bitmaps conditionally in the listbox definition: @0,0 listbox oLbx fields date, description, ; if(empty(::oTask:completed),hChecked,hUnchecked) Then you have to define an action when the column is clicked on: oLbx:blClicked := {| nRow, nCol| ( if(oLbx:nAtCol(nCol)=3,; toggleCheck(),),oLbx:drawSelect()) } The above line checks for column 3. If that is the column, then the function toggleCheck() is called. ToggleCheck() toggles the variable and saves the record. Finally, you redraw the line using oLbx:drawSelect(). [Note: You may need to pass nRow and check to make sure it is greater than 15 to avoid triggering the checkbox when the user clicks on the header. See file:///c:\apps\todo\task.prg, method click() for an example.]
Controls in Listbox
Can I use combobox in a listbox ? I need to edit a record in listboxes using dbcombobox to enter fixed values via each field in the record .
Controls in Listbox
James...thanks for the code...i'll give it a shot in the next week or so. I can see need for combobox usage in a listbox as well....im thinking that is quite a bit more complicted? Greg
Controls in Listbox
I have never used a combobox in a browse. Antonio mentioned in generic terms how to do it recently in another message thread. There may be something in the samples directory. James
Controls in Listbox
Have a look at how TWBrowse:EditCol() and TWBrowse:lEditCol() methods are implemented. EMG
Contruir HBIDE para OSX
descargar QT desde aqui: [url:22edooja]http&#58;//get&#46;qt&#46;nokia&#46;com/qt/source/qt-mac-cocoa-opensource-4&#46;6&#46;3&#46;dmg[/url:22edooja] hacer desde el terminal de OSX: export HB_WITH_QT=/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers y desde la carpeta de Harbour hacer: make y Harbour se construye con soporte de QT <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> libhbqt.a, libhbqtcore.a, libhbqtgui.a and libhbqtnetwork.a Ahora ir a contrib/hbide y hacer: ../../bin/darwin/clang/hbmk2 hbide.hbp
Contruir HBIDE para OSX
Estimado Tiene que ser OSX 10.6 ? Tengo el 10.5 Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, Para OSX 10.5.x cambia esta línea así: export HB_WITH_QT=/Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/QtCore.framework/Headers Tambien cambia esta línea así: Ahora ir a contrib/hbide y hacer: ../../bin/darwin/gcc/hbmk2 hbide.hbp de todas formas estoy probámdolo yo ahora a construirlo en Leopard (32 bits)
Contruir HBIDE para OSX
El detalle es que me sale esto en la terminal cuando compilo ompiling... ./build.sh: line 11: ./../../harbour/bin/harbour: Bad CPU type in executable compiling C module... i686-apple-darwin9-gcc-4.0.1: login.c: No such file or directory i686-apple-darwin9-gcc-4.0.1: no input files linking... i686-apple-darwin9-gcc-4.0.1: login.o: No such file or directory rm: login.c: No such file or directory rm: login.o: No such file or directory done! Al parecer harbour esta echo para otro CPU Saludos Osvaldo
Contruir HBIDE para OSX
La otra ... No encuentro el folder de contrib donde lo bajo o mas bien a lo mejor no tengo el folder completo de harbour Saludos Osvaldo
Contruir HBIDE para OSX
Osvaldo, Tienes que descargar Harbour completo desde su SVN, asi: svn co [url:2dafamen]https&#58;//harbour-project&#46;svn&#46;sourceforge&#46;net/svnroot/harbour-project/trunk[/url:2dafamen] harbour
Contruir HBIDE para OSX
Listo, baje el harbour via SVN Pero, no encuentro esto : ./../bin/darwin/gcc/hbmk2 hbide.hbp El folder de contrib si esta pero el de arriba no ya lo busque por todo los folders de trunk/harbour y nada Sorry amigo, algo me falta. Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, Primero tienes que construir Harbour. Situate en la carpeta de Harbour y escribe desde el terminal: make <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Contruir HBIDE para OSX
¿ Es posible proporcionar un hbide construido ya ? Saludos.
Contruir HBIDE para OSX
Manuel, Si, esa es la idea <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Lo que ocurre es que la versión actual tiene un bug importante (no se ve el texto escrito) y Pritpal está viendo la forma de solucionarlo. Pero aún asi, compila y enlaza perfectamente. Y es muy cómodo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Contruir HBIDE para OSX
Estimado muchas gracias ... Te comento Bajo el usuario o folder mac/ scribie el svn co .... y me creeo un folder llamado trunk/ adentro esta el harbour Una vez que termino de bajar todo me metid al folder de trunk/harbour y teclee make enter al final de todo me puso esto ibtool: file: -lX11 is not an object file (not allowed in a library) make[3]: *** [libharbour.2.1.0.dylib] Error 1 make[2]: *** [descend] Error 2 make[1]: *** [dynlib] Error 2 make: *** [src] Error 2 macmini:harbour mac$ Algun parametro que me falta ? Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, Has comprobado si se ha construido Harbour y las librerias ?
Contruir HBIDE para OSX
Estimado Probe con la version 10.6 y es lo mismo No me construye ningun harbour app ni niguna lib Saludos
Contruir HBIDE para OSX
Osvaldo, Aqui se construye correctamente y los ejecutables quedan situados en: /Users/anto/harbour/harbour/bin/darwin/clang/ en donde en vez de "anto" será tu nombre de usuario
Contruir HBIDE para OSX
Buen en este caso busque pero dentro de harbour/bin/darwin/gcc/ (no exite el clang) Ahi esta harbour y hbpp Estimado aun asi gracias por la paciencia Saludos
Contruir HBIDE para OSX
Osvaldo, Las librerias quedan construidas en: Users/anto/harbour/harbour/lib/darwin/clang/ clang solo aparece en Snow Leopard (64 bits). En Leopard (32 bits) no está
Contruir HBIDE para OSX
Lo curioso es que posiblemente tenga uno de 64bits y no me he percatado pero por el otro lado tengo una macmini, usando el 10.5 y me sale el mismo error. He tratado de bajar el svn es decir ../trunk harbour o ../trunk/harbour creyendo que a lo mejor se tratatara de problemas de folders, pero no es asi. Aun asi estoy migrando mis rutinas echas en Xbase++ otras de Clipper para tratar de tener listo un framework e iniciar con desarrollo. Lo que mas me urge y creo que se puede lograr es FTP,acceso a MySQL y Correos 1.- MySQL estoy viendo codigo en gcc++ y creo que no debe haber problemas excepto en los browses 2.- Lo de FTP, aun no inicio 3.- Y Correos, baje un codigo generado con objective-c usando el IDE Xcode Este codigo me pone el el bote de outbox del mail, alggo asi como MAPI asi q tratare de hacerlo funcionar desde harbour. En cuanto tengamos algo funcional de rutinas, con todo gusto los subieremos. Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Estimado Olvidandome un poco del svn Baje de nuevo los zip ya contruidos Borre antes todo lo que habia, pero al momento de compilar Me muestra esto usando una macmini 10.5 compiling... ./build.sh: line 11: ./../../harbour/bin/harbour: Bad CPU type in executable compiling C module... i686-apple-darwin9-gcc-4.0.1: testdlg.c: No such file or directory i686-apple-darwin9-gcc-4.0.1: no input files linking... i686-apple-darwin9-gcc-4.0.1: testdlg.o: No such file or directory rm: testdlg.c: No such file or directory rm: testdlg.o: No such file or directory done! ./build.sh: line 61: ./testdlg.app/Contents/MacOS/testdlg: No such file or directory macmini:samples mac$ Espero sus comentarios. Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, Por lo que se ve ese Mac Mini es de arquitectura "power pc" ( no "intel" ) y además no soporta 64 bits. En build.sh se indica el usar este flag para compilar en arquitectura power pc: # add -arch ppc -arch i386 for universal binaries gcc $1.c -c -I./../include -I./../../harbour/include prueba a llamarlo asi: gcc $1.c -c -I./../include -I./../../harbour/include -arch ppc
Contruir HBIDE para OSX
Estimado Esta mac mini es un 1.66 GHz Intel Core Duo 512 Mb 667 Mhz DDR2 SDRAM Pero, al ejecutar el harbour desde /harbour/bin me marca BAD CPU type in executable. Como voy a ejecutar un gcc $1.c si aun no me construye el archivo .c ? Voy a hacer lo mismo en la 10.6 y te comento manana Saludos y gracias Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, En tal caso será solo que no soporta 64 bits. Prueba con el flag: -arch i386
Contruir HBIDE para OSX
Pero amigo, como voy a ejecutar un gcc con esos parametros, si aun no tengo el archivo .c que me genera harbour ? Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Ok, bueno, te comento Baje el harbour via svn Y me construllo el harbour en el folder /bin/darwin/gcc al igual que las lib en su folder de /lib/darwing/gcc y estos los copi a su folder correspondiente o sea lo de bin al bin y lo del lib al lib pues bien, el harbour ya produce o crea el codigo en .c ahora modifique el /build.sh agregando el parametro -arch i386 con o sin el me presenta lo siguiente compiling... Harbour 2.1.0beta2 (Rev. 15171) Copyright (c) 1999-2010, <!-- m --><a class="postlink" href="http://harbour-project.org/">http://harbour-project.org/</a><!-- m --> Compiling 'testdlg.prg'... Lines 1018, Functions/Procedures 2 Generating C source output to 'testdlg.c'... Done. compiling C module... linking... ld warning: in ./../lib/libfive.a, file is not of required architecture ld warning: in ./../lib/libfivec.a, file is not of required architecture Undefined symbols: "_HB_FUN_TBUTTON", referenced from: _symbols_table in testdlg.o "_HB_FUN_TDIALOG", referenced from: _symbols_table in testdlg.o ld: symbol(s) not found collect2: ld returned 1 exit status done! ./build.sh: line 61: ./testdlg.app/Contents/MacOS/testdlg: No such file or directory macmini:samples mac$ Este fivewin lo baje el la pagina de la cual tenemos acceso con clave. Saludos Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, Hicistes bien, la solución era construir Harbour desde el SVN. Las librerias de FiveMac no son para esa versión de OSX. Si vas a trabajar con ese Mac Mini y las necesitas te las podemos enviar por email <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Contruir HBIDE para OSX
Gracias ... Lo que pasa en que en casa tengo 10.6 y en el trabajo 10.5, y ud' van muy bien, asi que a veces de aqui que llegue y pruebe en ambos Si no es mucha molestia poner ambos, para 10.5 y 10.6 si no, trabajo mejor con la 10.6 Ahora, ahi mismo en el trabajo con un cliente, tienen un OSX Server 10.4, power mac, y no creo que mi cliente quiera actualizarse a 10.6, pero de igual manera, si se puedes me lo envias, si no, esta bien. Saludos y gracias Osvaldo Ramirez
Contruir HBIDE para OSX
Osvaldo, Enviadas a tu email las librerias para Leopard 10.5 intel <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Contruir HBIDE para OSX
buenas noites , estoi precisando de la lib fivema para snow leopard 10.6?
Conversion 1303 to 1402 : PRINT ... cModel
Hello , Making the conversion from a big FWH aplication from FWH1303 to FWH1402 , i have problems withy the command : PRINT oPrn NAME cTitle TO aPrinters[nPrint] // Checked : PDFCREATOR , printer is defined in windows DBG oPrn oPrn Shows as expected cModel (PDFCreator) and a value for hDc BUT THE OUTPUT : DEFAULT WINDOWS PRINTER What has changed ? Frank
Conversion 1303 to 1402 : PRINT ... cModel
Hello , After some testing i found : Working : [code=fw:vwf51blp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">PRINTER</span> oPrn <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"PDFCreator"</span><span style="color: #B900B9;">//FROM USER // PREVIEW</span><br />      <span style="color: #0000ff;">PAGE</span><br />            oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">ENDPAGE</span>      <br />   <span style="color: #0000ff;">ENDPRINTER</span><br /> </div>[/code:vwf51blp] Not working (printing to windows default) : [code=fw:vwf51blp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">PRINTER</span> oPrn <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"PDFCreator"</span><span style="color: #B900B9;">//FROM USER // PREVIEW</span><br />      <span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span>oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//A4   !!!!!!!!!!!!!!!!!!!!!!!!!!!![/b]</span><br />      <span style="color: #0000ff;">PAGE</span><br />            oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">ENDPAGE</span>      <br />   <span style="color: #0000ff;">ENDPRINTER</span><br /> </div>[/code:vwf51blp] In printer.prg : // Defines for the oPrn:SetPage(nPage) method (The printer MUST support it) But also oPrn:Setcopies() gives the same result , probably all the methods which rebuild the printobject [code=fw:vwf51blp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> Rebuild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br />&nbsp; &nbsp;# ifdef FRANKDEMONT<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cModel := ::<span style="color: #000000;">cModel</span> &nbsp; <br />&nbsp; &nbsp;# <span style="color: #00C800;">endif</span><br /><br />.......<br />......<br /><span style="color: #B900B9;">/* following modifications after fw1308 are commented out subject to further review 2014-02-15<br />   // eg. SetLandScape(), etc. stopped working with this modification<br />   if ::hDC == 0<br />      ::hDC       = GetPrintDefault( GetActiveWindow() )<br />      ::lStarted  = .F.<br />      ::lModified = .T.<br />   endif<br />*/</span><br /><br />   <span style="color: #B900B9;">// Following 5 lines upto "endif" are restored from FW1308 2014-02-15</span><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">hDC</span> != <span style="color: #000000;">0</span><br />      DeleteDC<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />      # ifdef FRANKDEMONT<br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hDC</span> = PrinterDcFromName<span style="color: #000000;">&#40;</span> , cModel, <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; # <span style="color: #00C800;">else</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hDC</span> := GetPrintDefault<span style="color: #000000;">&#40;</span> GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; # <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//::hDC := GetPrintDefault( GetActiveWindow() )   // <== ???????????????????????????????????????????????????????</span><br />      ::<span style="color: #000000;">lStarted</span>   := .F.<br />      ::<span style="color: #000000;">lModified</span>  := .T.<br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">hDC</span> != <span style="color: #000000;">0</span><br />      <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lMeta</span><br />         ::<span style="color: #000000;">hDcOut</span> = ::<span style="color: #000000;">hDC</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:vwf51blp] Frank
Conversion 1303 to 1402 : PRINT ... cModel
I confirm the problem. Because of this I didn't switch to 1402. Still I am using 1309.
Conversion Clipper/FW to (x)Harbour/FW
FW, I wish to know how much recoding would be necessary to convert a Clipper+FW24 POS application to (X)Harbour + FW24 In the link script I saw reference to the following lib which I am not familiar if directly supported by (x)Harbour + FW. 1. COMIX 2. Telepathy Kindlly comments on how much re-coding woud be necessary. TIA, XHBCODER Here's the link script&#058; BLINKER HOST PASSUP OFF #BLINKER INCREMENTAL OFF #BLINKER EXECUTABLE COMPRESS 1 BLINKER CLIPPER SYMBOL OFF PACKCODE PACKDATA MAP=EXE\52\PCREGW.MAP S,A DEFBEGIN name PCREGW description 'PC/Register' exetype Windows 3.1 code preload moveable discardable data preload moveable stacksize 10000 heapsize 2000 segment 'PLANKTON_TEXT' nondiscardable segment 'EXTEND_TEXT' nondiscardable segment 'OM_TEXT' nondiscardable segment 'OSMEM_TEXT' nondiscardable segment 'SORTOF_TEXT' nondiscardable segment 'STACK_TEXT' nondiscardable DEFEND NOBELL FILE ADDALIAS, ADDNDX, ALTC, AREA1, AREA1_A, AREA1_B, AREA1_C, AREA1_D, AREA1_DB, AREA2, AREA2_A, AREA2_B, AREA2_C, AREA2_C2, AREA2_D, AREA2_E, AREA2_F, AREA2_H, AREA3, AREA3_A, AREA3_B, AREA3_C, AREA4, AREA4_A, AREA4_B, AREA4_C, AREA4_D, AUTHCOMM, AUTHSUP, AUTHTRAN, BATCHADM, CL_IPC, CL_PORTB, CONCORD, ENOUGH, FDBF, FEXPFILE, FLIVE, FMULTI, FPAD, FPCJOUR, FRENLAR, FRENCFG, FSCALE, FSUSPEND, FTAXRAM, FTXTVIEW, FUNIQUE, FUSEFILE, GENIO, GETPSW, GETSERI, GO, HARDWARE, IBM4694W, IBMSUP, ICSETUP, ICVERIFY, LUHN, MODE, OPENFILE, OPENSUSP, PCLW, PHYSICAL, PINPAD, PLU_FUNC, PRINTCFG, REGSETUP, RFLINE, ROOT, SCANNER, SHELL, TIMER, VERSION, JRNARCHV,LS_ALERT,LS_funcs #Platform specific FILE CAPFIRST, CCOMM, CCOPYDAT, CBUTTON, CDIALOG, CGET, CHTML, CPCREG, CRECT, CSHIFT4, CSTREAM, CWINDOW, DATASHET, ERRSYSW, HANDY, NOCOLOR, NOTECSUP, RAWPRINT, TELEPATH, TGET, XTIMER FILE COPYDATA, COMSTAT nodeflib #Modified DBCMD1 from CLIPPER.LIB version 5.2e FILE DBCMD1, DBFT # Comix RDD FILE cmx52, cmxFox52 LIB cmx52 @cmx.lnk #Telepathy extraction from TPOVL52.LIB FI TPBIN #Clipper extraction from Clipper.Lib ver 5.3, Fivewin recommends using FI ALLOC, MEMORY #After adding blxclp52, Clipper Internal Error - Unrecoveralbe error 332 is now traceable #and under windows xp - the error "§ caused an access violation in CUI.EXE at 0x77f57aec." #now only appears when application exits and not at startup. FI \DEV\BLI5\OBJ\BLXCLP52 #Blinker fix for Clipper Windows applications accross 32k boundaries FI \DEV\BLI5\OBJ\MPAR LIB Five, FiveC, Objects, WinApi, Clipper, Extend, Terminal RC WINDOWS\PCREG.RES RC WINDOWS\KEYBOARD.RES
Conversion Clipper/FW to (x)Harbour/FW
> I wish to know how much recoding would be necessary to convert a Clipper+FW24 POS application to (X)Harbour + FW24 > FWH is fully source code compatible with FW 16 bits, so practically no recoding is required. > In the link script I saw reference to the following lib which I am not familiar if directly supported by (x)Harbour + FW. 1. COMIX 2. Telepathy > You may use (x)Harbour built-in DBFCDX RDD instead of Comix. That will require just some changes in your app. You do need a 32 bits version of Telepathy.
Conversion Clipper/FW to (x)Harbour/FW
Amigo creo que tu version de Fivewin no es compatible con el XHARBOUR sigue consultando y me avisas la solucion, pues yo tambien estoy en el mismo problema. Rodolfo Silva <!-- e --><a href="mailto:sildata@cantv.net">sildata@cantv.net</a><!-- e -->
Conversion Folder to Folderex
On oldest app I used Folder class and I set the prompt number 1 with [code=fw:18xquofp]<div class="fw" id="{CB}" style="font-family: monospace;"> oFld:<span style="color: #000000;">SetItemText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>, aFileaps<span style="color: #000000;">&#91;</span>nSelect<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span></div>[/code:18xquofp] Now I wish use Folderex because I wish insert bitmaps and have the dialog transparent but not found the same function or egual into folderex I tried also with [code=fw:18xquofp]<div class="fw" id="{CB}" style="font-family: monospace;">oFld:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:= aFileaps<span style="color: #000000;">&#91;</span>nSelect<span style="color: #000000;">&#93;</span></div>[/code:18xquofp] but then the tab of folderex size not changed if the text is big as you can see here [img:18xquofp]https&#58;//i&#46;postimg&#46;cc/DZV8M6JX/tab&#46;png[/img:18xquofp] Any solution please
Conversion Folder to Folderex
resolved with oFld:resize()
Conversion Formulas
Hi Everybody, Are there any functions / formulas to convert: HEX number to Binary Number and Binary Number back to Hex
Conversion Formulas
Jeff, here is a common function to convert all formats, comments are in german, if you need a translation, please drop me a note [code:1xjc0wmg]/*** * * BaseToBase( <cInString>, <nInBase>, <nOutBase> ) --> cNewBaseValue * * Konvertiert einen Zahlenstring von einer Zahlenbasis in eine andere, * wobei Basen von 2 bis 36 beutzt werden können * * Convert a numberstring from one base to another * * */ FUNCTION BaseToBase( xInString, nInBase, nOutBase ) LOCAL cInString &#58;= "" LOCAL cDigits &#58;= "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" LOCAL cNewBaseValue &#58;= "" LOCAL i LOCAL DecPos LOCAL IntValue &#58;= 0 LOCAL FracValue &#58;= 0&#46;000000000000000000 LOCAL FracProduct LOCAL FracCounter LOCAL IntProdStr LOCAL FracOutStr LOCAL IntOutString LOCAL IntStr LOCAL FracString LOCAL FracLimit LOCAL Block LOCAL LChr LOCAL Remainder LOCAL Quotient LOCAL NegSign cInString &#58;= IIF (ValType(xInstring)="N", Str (Int(xInString),LenNum(xInString),0), xInString) cInString &#58;= UPPER( ALLTRIM( cInString ) ) // Parameter prüfen IF EMPTY( cInString ) &#46;OR&#46; VALTYPE( cInString ) <> "C" &#46;OR&#46; LEN( cInString ) > 19 cNewBaseValue &#58;= NIL ELSE nInBase &#58;= IF( EMPTY( nInBase ), 10, nInBase ) nOutBase &#58;= IF( EMPTY( nOutBase ), 10, nOutBase ) IF VALTYPE( nInBase ) <> "N" &#46;OR&#46; VALTYPE( nOutBase ) <> "N" cNewBaseValue &#58;= NIL ELSE // Prüfen ob Zahlenbasis gültig IF ( nInBase > 36 &#46;OR&#46; nOutBase > 36 &#46;OR&#46; nInBase < 2 &#46;OR&#46; nOutBase < 2 ) cNewBaseValue &#58;= NIL ELSE i &#58;= 1 DO WHILE i++ < LEN( cInString ) &#46;AND&#46; cNewBaseValue <> NIL IF &#46;NOT&#46; SUBSTR( cInString, i, 1 ) $ ( SUBSTR( cDigits, 1, nInBase ) + "&#46;" ) cNewBaseValue &#58;= NIL ENDIF ENDDO ENDIF ENDIF ENDIF IF cNewBaseValue <> NIL // Prüfen ob cInString negativ ist NegSign &#58;= IF( SUBSTR( cInString, 1, 1 ) == "-", "-", "" ) IF &#46;NOT&#46; EMPTY( NegSign ) cInString &#58;= SUBSTR( ALLTRIM( SUBSTR( cInString, 2 ) ), 2 ) ENDIF // Auffinden des Dezimalspunktes DecPos &#58;= AT( "&#46;", cInString ) IntStr &#58;= IF( DecPos > 1, SUBSTR( cInString, 1, DecPos - 1 ), IF( DecPos == 1, "0", cInString ) ) FracString &#58;= IF( DecPos > 0, SUBSTR( cInString, DecPos + 1 ), "0" ) // Konvertieren des Integerteils zur Basis 10 FOR i = LEN( IntStr ) TO 1 STEP -1 IntValue += ( AT( SUBSTR( IntStr, i, 1 ), cDigits) - 1) * ( nInBase ** ( LEN( IntStr ) - i ) ) NEXT // Konvertieren des Dezimalsrests zur Basis 10 FOR i &#58;= 1 TO LEN( FracString ) FracValue += ( AT( SUBSTR( FracString, i, 1 ), cDigits ) - 1 ) * ( nInBase ** ( - i ) ) NEXT // Berechnen des Ausgabestrings des Integerteils Quotient &#58;= IntValue IntOutString &#58;= "" DO WHILE Quotient <> 0 Remainder &#58;= Quotient % nOutBase Quotient &#58;= INT( Quotient / nOutBase ) IntOutString &#58;= SUBSTR( cDigits, Remainder + 1, 1 ) + IntOutString ENDDO IntOutString &#58;= IF( EMPTY( IntOutstring ), "0", IntOutString ) // Berechnen des Ausgabestrings FracLimit &#58;= 19 - DecPos FracProduct &#58;= FracValue FracCounter &#58;= 1 FracOutStr &#58;= "" // Da die folgenden WHILE-Bedingung den Ausdruck enthält&#58; // FracCounter++ < FracLimit &#46;AND&#46; FracProduct < 0&#46;00000000000001 // braucht der Schleifenblock nicht ausgeführt werden, um nachfolgende // Nullen zu entfernen DO WHILE FracCounter++ < FracLimit &#46;AND&#46; FracProduct <> 0 IntProdStr &#58;= FracProduct * nOutBase FracOutStr &#58;= FracOutStr + SUBSTR( cDigits, INT( IntProdStr ) + 1, 1 ) FracProduct &#58;= IntProdStr - INT( IntProdStr ) ENDDO // Entfernen nachfolgender Nullen Block&#58;={ || LChr &#58;= RIGHT(FracOutStr, 1), ; IF(LChr == "0", FracOutStr &#58;= SUBSTR(FracOutStr, 1, LEN(FracOutStr) - 1), 0), ; IF(LChr == "0", EVAL(Block), FracOutStr) } FracOutStr &#58;= EVAL( Block ) /* Der folgende Block benötigt mehr Speicher, ist aber kürzer&#58; Block &#58;= { |Str| IF(RIGHT(Str, 1) == "0", ; EVAL(Block, SUBSTR(FracOutStr, 1, LEN(FracOutStr) - 1)), Str)} */ ENDIF // Ausgabe IF cNewBaseValue <> NIL cNewBaseValue &#58;= IF( DecPos > 0, NegSign + IntOutString + "&#46;" + FracOutStr, IntOutString ) ENDIF RETURN ( IIF (cNewBaseValue=nil,"Fehler",cNewBaseValue) ) [/code:1xjc0wmg]
Conversion PDF into BMP
Hi all Is there a function to convert a pdf file type into bmp? TIA
Conversion PDF into BMP
Hi, I also have searched a conversion function but I could not. I have find a .net library for conversion pdf to tiff, word, bmp. I have bought the library and write a small conversion application that is used with command line parameters in c#. But it needs a .net framework 3.5sp1 and library's dll file. I run it from my application. This is not preferable solution but it solves my problem. if you want, I can send it.
Conversion PDF into BMP
Any [color=#0000FF:1q7unifz][b:1q7unifz]FRE[/b:1q7unifz]E[/color:1q7unifz] Pdf-converter You need : or commandline needed ? <!-- m --><a class="postlink" href="http://download.cnet.com/PDF-to-Image-Command-Line/3000-18497_4-10568738.html">http://download.cnet.com/PDF-to-Image-C ... 68738.html</a><!-- m --> <!-- m --><a class="postlink" href="http://www.lotapps.com/free-pdf-to-image-converter.html">http://www.lotapps.com/free-pdf-to-image-converter.html</a><!-- m --> PDF to => BMP, PNG, JPG, TIFF, GIF <!-- m --><a class="postlink" href="http://www.weenysoft.com/">http://www.weenysoft.com/</a><!-- m --> another Download : <!-- m --><a class="postlink" href="http://www.kvisoft.com/downloads.html">http://www.kvisoft.com/downloads.html</a><!-- m --> [img:1q7unifz]http&#58;//www&#46;pflegeplus&#46;com/pictures/weeny1&#46;jpg[/img:1q7unifz] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Conversion XHARBOUR to HARBOUR
Hello , I try to make a conversion from xharbour to harbour with a minimum to change in the source. I found that xhb.lib should be linked in , also xhb.ch should be included in the prg-file. xhb.ch calls hbcompat.ch . Here it is not clear to me that __XHARBOUR__ must be declared I suppose that __HARBOUR__ and __XHARBOUR__ should be declared. Till now i had as problem : 1) GLOBAL EXTERNAL or GLOBAL are not allowed. A work arround is to use static's and functions wich returns this static's 2) set.ch has in XHARBOUR more extensions , i.e. set(_SET_ERRORLOG ,"Autoclose.log") All sugestions are welcome Frank Demont
Conversion XHARBOUR to HARBOUR
[code=fw:1c2t42ep]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"common.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dbinfo.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ads.ch"</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"report.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dbcombo3.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fastreph.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"filexls.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"calendar.ch"</span><br /><br />#ifdef __HARBOUR__<br />   #ifndef __XHARBOUR__<br />      <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xhb.ch"</span><br />      <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xhbcls.ch"</span><br />      #stdout Compilando con HARBOUR compiler, incluye compatibilidad con XHARBOUR.<br />   #else<br />&nbsp; &nbsp; &nbsp; #ifdef __XCC__<br />&nbsp; &nbsp; &nbsp; #else<br />      #stdout Compilando con XHARBOUR compiler.<br />&nbsp; &nbsp; &nbsp; #endif<br />   #endif<br />#endif<br /><br /> </div>[/code:1c2t42ep]
Conversion XHARBOUR to HARBOUR
[quote="carlos vargas":1sbvmk92][code=fw:1sbvmk92]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"common.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dbinfo.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ads.ch"</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"report.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dbcombo3.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fastreph.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"filexls.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"calendar.ch"</span><br /><br />#ifdef __HARBOUR__<br />   #ifndef __XHARBOUR__<br />      <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xhb.ch"</span><br />      <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xhbcls.ch"</span><br />      #stdout Compilando con HARBOUR compiler, incluye compatibilidad con XHARBOUR.<br />   #else<br />      #ifdef __XCC__<br />      #else<br />      #stdout Compilando con XHARBOUR compiler.<br />      #endif<br />   #endif<br />#endif<br /><br /> </div>[/code:1sbvmk92][/quote:1sbvmk92] Carlos , Thanks for the reply. I noticed that combat.ch is called from xhb.ch , also i need a conversion for a program written for xharbour to harbour , so i changed your code as : [code=fw:1sbvmk92]<div class="fw" id="{CB}" style="font-family: monospace;"><br /># ifdef __HARBOUR__<br /># ifdef __XHARBOUR__<br /># undef __XHARBOUR__<br /># <span style="color: #00C800;">endif</span><br /># include <span style="color: #ff0000;">"xhb.ch"</span><br /># include <span style="color: #ff0000;">"xhbcls.ch"</span><br /># INCLUDE <span style="color: #ff0000;">"xset.ch"</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// From xharbour , extensions from xharbour 200 ... 211</span><br /># <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:1sbvmk92] Yesterday i reported 2 problems : 1) GLOBAL (EXTERNAL) 2)Set values from xharbour (200 ...) Now i have another difference between harbour and xharbour Arr[1] := {"a",1} ATAIL(Arr[1]) := 2 // Accepted by xharbour , not harbour or clipper Frank
Conversion XHARBOUR to HARBOUR
Frank, Try to use Harbour features only. Many xharbour users are migrating to Harbour
Conversion XHARBOUR to HARBOUR
[quote="Antonio Linares":1op1zoto]Frank, Try to use Harbour features only. Many xharbour users are migrating to Harbour[/quote:1op1zoto] Antonio It is a big project (50 prg-files) , a first step is to make litle changes. Where do i find good documentation from harbour ? Frank
Conversion XHARBOUR to HARBOUR
Frank, Have a look here: [url:3chlhy2n]http&#58;//www&#46;fivetechsoft&#46;com/harbour-docs/harbour&#46;html[/url:3chlhy2n]
Conversion a C
Hola, Haber quien me hecha un cable con esta conversion a C Me gustaria hacer esto: [code:13muts53]FUNCTION Test&#40; cData &#41; Local nError &#58;= 0 MiFuncionC&#40; cData, @nError &#41; RETURN nError[/code:13muts53] Yo creo q seria algo asi, pero me falta definir nError y como paso el paramtro por referencia: [code:13muts53]#pragma BEGINDUMP #include "windows&#46;h" #include "hbapi&#46;h" LPWSTR AnsiToWide&#40; LPSTR &#41;; HB_FUNC &#40; TEST &#41; &#123; LPWSTR cData = AnsiToWide&#40; hb_parc&#40; 1 &#41; &#41;; MiFuncionC&#40; cData, nError ???&#41; <- Como defino nError &#40; p&#46;e&#46; nError &#58;= 0, y lo paso por referencia &#41; retnl&#40; nError &#41; &#125; #pragma ENDDUMP [/code:13muts53] Gracias atodos.
Conversion a C
Carles, Quizás esto te pueda ayudar, aunque no estoy muy seguro. <!-- m --><a class="postlink" href="http://www.capelblog.com/?p=75">http://www.capelblog.com/?p=75</a><!-- m --> Saludos, José Luis Capel
Conversion a C
Carles, Es bastante más simple si lo cambias así: [code:17vf8sez] FUNCTION Test&#40; cData, nError &#41; MiFuncionC&#40; cData, @nError &#41; RETURN nError [/code:17vf8sez] te sirve ?
Conversion a C
Antonio, Si me serviria, pero como declaro la variable nError dentro de la funcion y como la paso por referencia ? [code:2c9qqg6p]#pragma BEGINDUMP #include "windows&#46;h" #include "hbapi&#46;h" LPWSTR AnsiToWide&#40; LPSTR &#41;; HB_FUNC &#40; TEST &#41; &#123; LPWSTR cData = AnsiToWide&#40; hb_parc&#40; 1 &#41; &#41;; nError = hb_parnl&#40;2&#41; ; <- Como declaro nError &#40;2º parametro&#41; ? MiFuncionC&#40; cData, &nError&#41; <- Como defino nError por referencia con el & ? &#125; #pragma ENDDUMP [/code:2c9qqg6p] Gracias
Conversion a C
Carles, [code:3acck0nc] #pragma BEGINDUMP #include "windows&#46;h" #include "hbapi&#46;h" LPWSTR AnsiToWide&#40; LPSTR &#41;; HB_FUNC &#40; TEST &#41; &#123; LPWSTR cData = AnsiToWide&#40; hb_parc&#40; 1 &#41; &#41;; LONG nError = hb_parnl&#40;2&#41; ; MiFuncionC&#40; cData, &nError &#41;; hb_stornl&#40; nError, 2 &#41;; &#125; #pragma ENDDUMP [/code:3acck0nc]
Conversion a C
Antonio, Gracias. Casi lo consigo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->. Voy a probarlo
Conversion a C
Antonio, El ejemplo propuesto funciona de maravillas -> gracias. Ahora necesito crear otro ejemplo, y necesito saber como se declaran las variables. No me gusta tocar las narices y si me dices donde puedo encontrar definiciones, me lo mirare. He intentado mirarme ficheros include, pero la verdad, no se si realmente miro lo correcto. Tambien, donde puedo mirar funciones que devuelven los valors, tipo hb_stornl(), hb_retnl(), ... Ahora estoy enganchado en definir lo q en un prg seria: cBuffer := Space(200) lAccept := .f. Gracias.
Conversion a C
Carles, > cBuffer := Space(200) char buffer[ 200 ]; > lAccept := .f. BOOL bAccept = FALSE; Revisa el código fuente de Harbour. En el directorio RTL tienes muchos ejemplos.
Conversion con FW++ e Xbase++ de alaska
Buenos dias Sr. Antonio linares !!!!! Tengo un sistema en Clipper y alguna cosa convertida en FW.. me gustaria de convertir rápido mi sistema . Vi en el site en la seccion FW++ , que dice que es posible en menos de una semana hacer esta conversion , esto es una realidad ???
Conversion con FW++ e Xbase++ de alaska
Pablo, > esto es una realidad ??? De FW a FW 32 bits (bien sea FW++ ó FWH), Si <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> De todas formas, te recomendamos FWH y Harbour, en vez de FW++, ya que ha demostrado funcionar muchísimo mejor <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Conversion de BMP a JPG
Buenos días, creo haberlo leido antes en el foro, pero no consigo encontrarlo, estoy guardando en una table una imagen, hasta ahora obtengo la imagen en formato BMP y así la estaba guardando, pero utiliza muchisimo espacio en la tabla, por lo que pienso en guardarla en formato JPG. Tenemos alguna función que nos permita hacer la conversión? Muchas gracias. Un saludo
Conversion de BMP a JPG
[code=fw:28gh0djd]<div class="fw" id="{CB}" style="font-family: monospace;"><br />FW_SaveImage<span style="color: #000000;">&#40;</span> uImage, cFile, nJpegQuality <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:28gh0djd] Parameters: 1. uImage. Can be hBitmap, ptrtoGDI+Image, cAnyImagefile/resource. In your case it can be bitmap file or hBitmap 2. cFile. File to be saved. If cFile has extension of "jpg" or "jpeg" the file is saved in jpeg format 3. nJpegQuality: Optional. You may use a higher value for better quality. Try with different values
Conversion de BMP a JPG
Thanks Good day
Conversion de DLL 16 bits a 32 bits.
HOla: Ando tratando de convertir una libreria con recursos hecha con el Resource Workshop 4.5 16 bits y siguiendo vuestras indicaciones al final me he instalado el Borland Resource Workshop 4.5 que guardaba por ahi (desde luego no se puede tirar nada), en un mini portatil de estos de hace unos 12 -15 años, un packard Bell que es eterno, por cierto. El caso es que lee perfectamente la libreria y la he guardado como .rc Entonces al intentar leerla con el ResEdit me da error. DS_MODALFRAME identificador no declarado. y con el Pelles C, simplemente me la carga como texto y se queda tan ancho, no me deja guardarla, en .res ni nada. ¿Que he hecho mal? Al generar el .rc desde el Workshop 4.5 hay que hacer algo especial? Os agradeceria encarecidamente si teneis alguna idea me lo digais para probarla. Si alguien esta interesado en ver la libreria convertida puedo pasarsela por WeTransfer. Gracias por adelantado. Jose.
Conversion de DLL 16 bits a 32 bits.
Hola, para converter, use una DLL ou RC de 32 bits del \samples del fivewin de 32 bits. Por ejemplo: \samples\autola32.dll Haga el importe de la de 16 bits para esta de 32 bits, via WORKSHOP.EXE the best. Saludos.
Conversion de DLL 16 bits a 32 bits.
Gracias por tu interes Karinha. Ya pude convertirla, estoy muy satisfecho, lo he conseguido con la utilidad rc32dll.bat, que hay que adaptar a la ruta de tu compilador de C Pero bueno genial. Ahora tengo que seguir... Por cierto la libreria que utilizaba para impresion era preview.dll, tengo entendido que ahora debe ser Prev32.dll, pero no la encuentro en el directorio dll supongo que en bitbucket estara, voy a buscarla. Saludos. Jose.
Conversion de DLL 16 bits a 32 bits.
Prev32.dll, en esta versión del five ya no es necesario. Saludos.
Conversion from C c# Exel VB
Hello, I have a data logger from Pico TC-08 witch handles 8 probes for data logging. They have a SDK software platform where we could make software to handle more specifiek things. There are all the DLL, lib, H files included. There is also sample program's in the 4 languages (see title) Can this work with FWH or is it not possible. I looks like the C version is pretty simular to FWH ? or are the others a better way to look into ? [code=fw:rzryzxjh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">/**************************************************************************<br /> *<br /> *     ooooooooo.    o8o                       <br /> *     `888   `Y88.  `''                       <br /> *      888   .d88' oooo   .ooooo.   .ooooo.   <br /> *      888ooo88P'  `888  d88' `'Y8 d88' `88b  <br /> *      888          888  888       888   888  <br /> *      888          888  888   .o8 888   888  <br /> *     o888o        o888o `Y8bod8P' `Y8bod8P'  <br /> *<br /> *<br /> *    Copyright Pico Technology Ltd 1995-2015<br /> *<br /> * <br /> *    For sales and general information visit<br /> *    https://www.picotech.com   <!-- m --><a class="postlink" href="https://www.picoauto.com">https://www.picoauto.com</a><!-- m --><br /> *    <br /> *    For help and support visit<br /> *    https://www.picotech.com/tech-support<br /> * <br /> *    If you have what it takes to join us visit<br /> *    http://pico.jobs/<br /> *<br /> *<br /> * Descrition<br /> *   C Example Program using the USB TC-08 driver<br /> *<br /> **************************************************************************/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"usbtc08.h"</span><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><br /><br />int main<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    short handle = <span style="color: #000000;">0</span>;     <span style="color: #B900B9;">/* The handle to a TC-08 returned by usb_tc08_open_unit() */</span><br />    char selection = <span style="color: #000000;">0</span>;   <span style="color: #B900B9;">/* User selection from teh main menu */</span><br />    float temp<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span>;        <span style="color: #B900B9;">/* Buffer to store temperature readings from the TC-08 */</span><br />    int channel, reading; <span style="color: #B900B9;">/* Loop counters */</span><br />    int retVal = <span style="color: #000000;">0</span>;       <span style="color: #B900B9;">/* Return value from driver calls indication success / error */</span><br />    USBTC08_INFO unitInfo;<span style="color: #B900B9;">/* Struct to hold unit information */</span><br />    <br />    <br />    <span style="color: #B900B9;">/* Print header information */</span><br />    printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Pico Technology USB TC-08 Console Example Program<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />    printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"-------------------------------------------------<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />    printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Looking for USB TC-08 devices on the system<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />    printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Progress: "</span><span style="color: #000000;">&#41;</span>;<br />    <br />    <br />    <span style="color: #B900B9;">/* Try to open one USB TC-08 unit, if available <br />     * The simplest way to open the unit like is this:<br />     *   handle = usb_tc08_open_unit();<br />     * but that will cause your program to wait while the driver downloads<br />     * firmware to any connected TC-08 units. If you're making an <br />     * interactive application, it's better to use <br />     * usb_tc08_open_unit_async() which returns immediately and allows you to <br />     * display some sort of progress indication to the user as shown below: <br />     */</span><br />    retVal = usb_tc08_open_unit_async<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />    <br />    <span style="color: #B900B9;">/* Make sure no errors occurred opening the unit */</span><br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>!retVal<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />        printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>Error opening unit. Exiting.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        <span style="color: #00C800;">return</span> <span style="color: #000000;">-1</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #B900B9;">/* Display a text "progress bar" while waiting for the unit to open */</span><br />    <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>retVal = usb_tc08_open_unit_progress<span style="color: #000000;">&#40;</span>&handle,<span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == USBTC08_PROGRESS_PENDING<span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        <span style="color: #B900B9;">/* Update our "progress bar" */</span><br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"|"</span><span style="color: #000000;">&#41;</span>;<br />        fflush<span style="color: #000000;">&#40;</span>stdout<span style="color: #000000;">&#41;</span>;<br />        <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />        <br />    <span style="color: #B900B9;">/* Determine whether a unit has been opened */</span><br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>retVal != USBTC08_PROGRESS_COMPLETE || handle <= <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />        printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>No USB TC-08 units could be opened. Exiting.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        <span style="color: #00C800;">return</span> <span style="color: #000000;">-1</span>;<br />    <span style="color: #000000;">&#125;</span> <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />        printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>USB TC-08 opened successfully.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <br />    <span style="color: #B900B9;">/* Get the unit information */</span><br />    unitInfo.<span style="color: #0000ff;">size</span> = sizeof<span style="color: #000000;">&#40;</span>unitInfo<span style="color: #000000;">&#41;</span>;<br />    usb_tc08_get_unit_info<span style="color: #000000;">&#40;</span>handle, &unitInfo<span style="color: #000000;">&#41;</span>;<br />    <br />    printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span>Unit information:<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />    printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Serial: %s <span style="color: #000000;">\n</span>Cal date: %s <span style="color: #000000;">\n</span>"</span>, unitInfo.szSerial, unitInfo.szCalDate<span style="color: #000000;">&#41;</span>;<br /><br />    <span style="color: #B900B9;">/* Set up all channels */</span><br />    retVal = usb_tc08_set_channel<span style="color: #000000;">&#40;</span>handle, <span style="color: #000000;">0</span>,<span style="color: #ff0000;">'C'</span><span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>channel = <span style="color: #000000;">1</span>; channel < <span style="color: #000000;">9</span>; channel++<span style="color: #000000;">&#41;</span><br />        retVal &= usb_tc08_set_channel<span style="color: #000000;">&#40;</span>handle, channel,<span style="color: #ff0000;">'K'</span><span style="color: #000000;">&#41;</span>;<br />    <br />    <span style="color: #B900B9;">/* Make sure this was successful */</span><br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>retVal<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span>Enabled all channels, selected Type K thermocouple.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span> <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />        printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>Error setting up channels. Exiting.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        usb_tc08_close_unit<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span>;<br />        <span style="color: #00C800;">return</span> <span style="color: #000000;">-1</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <br />    <span style="color: #B900B9;">/* Main menu loop */</span><br />    <span style="color: #00C800;">do</span> <span style="color: #000000;">&#123;</span><br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span>Please enter one of the following commands<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"------------------------------------------<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"S - Single reading on all channels<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"C - Continuous reading on all channels<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"X - Close the USB TC08 and exit <span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />        <br />        <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span> == scanf_s<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" %c"</span>, &selection<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />            ; <span style="color: #B900B9;">/* Do nothing until a character is entered */</span> <br />        <br />        <span style="color: #00C800;">switch</span> <span style="color: #000000;">&#40;</span>selection<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />        <br />        <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'S'</span>:<br />        <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'s'</span>: <span style="color: #B900B9;">/* Single reading mode */</span><br />            printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Getting single reading..."</span><span style="color: #000000;">&#41;</span>;<br />            fflush<span style="color: #000000;">&#40;</span>stdout<span style="color: #000000;">&#41;</span>;<br />            <span style="color: #B900B9;">/* Request the reading */</span><br />            usb_tc08_get_single<span style="color: #000000;">&#40;</span>handle, temp, <span style="color: #00C800;">NULL</span>, USBTC08_UNITS_CENTIGRADE<span style="color: #000000;">&#41;</span>;<br />            printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" done!<span style="color: #000000;">\n</span>CJC      : %3.2f C<span style="color: #000000;">\n</span>"</span>, temp<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />            <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>channel = <span style="color: #000000;">1</span>; channel < <span style="color: #000000;">9</span>; channel++<span style="color: #000000;">&#41;</span><br />                printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Channel %d: %3.2f C<span style="color: #000000;">\n</span>"</span>, channel, temp<span style="color: #000000;">&#91;</span>channel<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />            <span style="color: #00C800;">break</span>;<br />            <br />        <br />        <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'C'</span>:<br />        <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'c'</span>: <span style="color: #B900B9;">/* Continuous (Streaming) mode */</span><br />            printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Entering streaming mode. Collecting 10 readings.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />            printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"  CJC    Ch1    Ch2    Ch3    Ch4    Ch5    Ch6    Ch7    Ch8<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />            <span style="color: #B900B9;">/* Set the unit running */</span><br />            usb_tc08_run<span style="color: #000000;">&#40;</span>handle, usb_tc08_get_minimum_interval_ms<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />            <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>reading = <span style="color: #000000;">0</span>; reading < <span style="color: #000000;">10</span>; reading++<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br /><br />                <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>channel = <span style="color: #000000;">0</span>; channel < <span style="color: #000000;">9</span>; channel++<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />                <br />                    <span style="color: #B900B9;">/* Wait for a reading to be available */</span><br />                    <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span> == <span style="color: #000000;">&#40;</span>retVal = usb_tc08_get_temp<span style="color: #000000;">&#40;</span>handle, temp, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">1</span>, <span style="color: #00C800;">NULL</span>, <br />                            channel, USBTC08_UNITS_CENTIGRADE, <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />                        <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// Wait for a reading or error</span><br />                    <span style="color: #000000;">&#125;</span><br />                    <span style="color: #B900B9;">/* Must check for errors (e.g. device could be unplugged) */</span><br />                    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>retVal < <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />                        printf <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>Error while streaming.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />                        usb_tc08_stop<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span>;<br />                        <span style="color: #00C800;">return</span> <span style="color: #000000;">-1</span>;<br />                    <span style="color: #000000;">&#125;</span><br />                    printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%6.2f "</span>, temp<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />                <span style="color: #000000;">&#125;</span><br />                printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />            <span style="color: #000000;">&#125;</span><br />            usb_tc08_stop<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span>;<br />            <span style="color: #00C800;">break</span>;<br />        <span style="color: #000000;">&#125;</span><br />        <br />    <span style="color: #000000;">&#125;</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span>selection != <span style="color: #ff0000;">'X'</span> && selection != <span style="color: #ff0000;">'x'</span><span style="color: #000000;">&#41;</span>;<br />    <br />    <span style="color: #B900B9;">/* Close the TC-08 */</span><br />    usb_tc08_close_unit<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span>;<br />    <br />    <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:rzryzxjh]
Conversion from C c# Exel VB
[code=fw:3uuxmemm]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"usbtc08.h"</span><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> USB_TC08_OPEN_UNIT_ASYNC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   hb_retnll<span style="color: #000000;">&#40;</span> usb_tc08_open_unit_async<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:3uuxmemm] This way you can build all the functions used in the example
Conversion from ca-clipper ( not found a variable)
I have this error Error description: Error BASE/1003 Variabile inesistente: C1 on the source numeri:= 9 combinaz:= 10 scelta:= "2" c1:= "102030405060708090" c2:= "011121314151617181" c3:= "021222324252627282" c4:= "031323334353637383" c5:= "041424344454647484" c6:= "051525354555657585" c7:= "061626364656667686" c8:= "071727374757677787" c9:= "081828384858687888" c10:= "091929394959697989" contacomb:= 1 do while (contacomb <= combinaz) c:= "C" + LTrim(Str(contacomb)) cnum:= LTrim(Trim(&c)) <----------------- give me error here not found c1 conta:= 1 do while (conta <= Len(cnum) / 2) num:= "N" + LTrim(Str(conta)) &num:= SubStr(cnum, conta * 2 - 1, 2) if (SubStr(&num, 1, 1) = "0") &num:= SubStr(&num, 2, 1) endif conta:= conta + 1 enddo How I can resolve ?
Conversion from ca-clipper ( not found a variable)
[code=fw:g7bgnjm4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SILCONV.PRG - MODIFIED By Joao Santos. 01/03/2022.</span><br /><span style="color: #B900B9;">// Compilado con: HARBOUR y xHARBOUR. BCC74.</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />MEMVAR c1, c2, c3, c4, c5, c6, c7, c8, c9, c10<br /><br /><span style="color: #00C800;">FUNCTION</span> SILCONV<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> numeri &nbsp; &nbsp;:= <span style="color: #000000;">9</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> combinaz &nbsp;:= <span style="color: #000000;">10</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> scelta &nbsp; &nbsp;:= <span style="color: #ff0000;">"2"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> contacomb := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> c, cNum, Conta, Num<br /><br />&nbsp; &nbsp;c1 &nbsp;:= <span style="color: #ff0000;">"102030405060708090"</span><br />&nbsp; &nbsp;c2 &nbsp;:= <span style="color: #ff0000;">"011121314151617181"</span><br />&nbsp; &nbsp;c3 &nbsp;:= <span style="color: #ff0000;">"021222324252627282"</span><br />&nbsp; &nbsp;c4 &nbsp;:= <span style="color: #ff0000;">"031323334353637383"</span><br />&nbsp; &nbsp;c5 &nbsp;:= <span style="color: #ff0000;">"041424344454647484"</span><br />&nbsp; &nbsp;c6 &nbsp;:= <span style="color: #ff0000;">"051525354555657585"</span><br />&nbsp; &nbsp;c7 &nbsp;:= <span style="color: #ff0000;">"061626364656667686"</span><br />&nbsp; &nbsp;c8 &nbsp;:= <span style="color: #ff0000;">"071727374757677787"</span><br />&nbsp; &nbsp;c9 &nbsp;:= <span style="color: #ff0000;">"081828384858687888"</span><br />&nbsp; &nbsp;c10 := <span style="color: #ff0000;">"091929394959697989"</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span><span style="color: #000000;">&#40;</span> contacomb <= combinaz <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> contacomb >= combinaz<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; c := <span style="color: #ff0000;">"C"</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> contacomb <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cnum := LTrim<span style="color: #000000;">&#40;</span> Trim<span style="color: #000000;">&#40;</span> &c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// < give me error here not found c1</span><br /><br />&nbsp; &nbsp; &nbsp; ? cnum &nbsp;<span style="color: #B900B9;">// perfecto</span><br /><br />&nbsp; &nbsp; &nbsp; conta := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">WHILE</span><span style="color: #000000;">&#40;</span> conta <= Len<span style="color: #000000;">&#40;</span> cnum <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;num &nbsp;:= <span style="color: #ff0000;">"N"</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> conta <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&num := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cnum, conta * <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> &num, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"0"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &num := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> &num, <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// No comprendo bien, mas funciona perfecto.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ? "Line 58/60: ", &num &nbsp;// numeros aleatorios.</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;conta := conta + <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp; &nbsp; contacomb := contacomb + <span style="color: #000000;">1</span> &nbsp;<span style="color: #B900B9;">// Incremental number. perfectoÿ</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// fin / end</span><br />&nbsp;</div>[/code:g7bgnjm4] Regards, saludos.
Conversion from ca-clipper ( not found a variable)
I not understood, where is the error, on ca-clipper it was ok the c1,c2... are not memvar but local and each combination have different C(n) there is one have until C45 I not understood why you must change my code allways
Conversion from ca-clipper ( not found a variable)
Silvio, lo que debes entender es que en CLIPPER, HARBOUR o xHARBOUR, siempre tienes varias formas diferentes de hacer lo mismo. El COMPILADOR te permite ser ilimitado. Cada uno tiene su forma de programar, utiliza siempre el modo de programación que más te guste. Silvio, what you need to understand is that in CLIPPER, HARBOUR or xHARBOUR, you always have several different ways of doing the same thing. The COMPILER allows you to be unlimited. Each one has its way of programming, always use the programming mode that you like the most. [code=fw:sap9d972]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SILCONV2.PRG - MODIFIED By Joao Santos. 02/03/2022.</span><br /><span style="color: #B900B9;">// Compilado con: HARBOUR y xHARBOUR Para: BCC74.</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SILCONV<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> numeri &nbsp; &nbsp;:= <span style="color: #000000;">9</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> combinaz &nbsp;:= <span style="color: #000000;">10</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> scelta &nbsp; &nbsp;:= <span style="color: #ff0000;">"2"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> contacomb := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> c, cNum, Conta, Num<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// COMMAND COMBINATION -> Distintas formas de hacer lo mismo.</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Puede comentar con // y el compilador asumirá que las VARIABLES son MEMVAR.</span><br />&nbsp; &nbsp;MEMVAR &nbsp;c1, c2, c3, c4, c5, c6, c7, c8, c9, c10<br />&nbsp; &nbsp;<span style="color: #00C800;">PRIVATE</span> c1, c2, c3, c4, c5, c6, c7, c8, c9, c10<br /><br />&nbsp; &nbsp;c1 &nbsp;:= <span style="color: #ff0000;">"102030405060708090"</span><br />&nbsp; &nbsp;c2 &nbsp;:= <span style="color: #ff0000;">"011121314151617181"</span><br />&nbsp; &nbsp;c3 &nbsp;:= <span style="color: #ff0000;">"021222324252627282"</span><br />&nbsp; &nbsp;c4 &nbsp;:= <span style="color: #ff0000;">"031323334353637383"</span><br />&nbsp; &nbsp;c5 &nbsp;:= <span style="color: #ff0000;">"041424344454647484"</span><br />&nbsp; &nbsp;c6 &nbsp;:= <span style="color: #ff0000;">"051525354555657585"</span><br />&nbsp; &nbsp;c7 &nbsp;:= <span style="color: #ff0000;">"061626364656667686"</span><br />&nbsp; &nbsp;c8 &nbsp;:= <span style="color: #ff0000;">"071727374757677787"</span><br />&nbsp; &nbsp;c9 &nbsp;:= <span style="color: #ff0000;">"081828384858687888"</span><br />&nbsp; &nbsp;c10 := <span style="color: #ff0000;">"091929394959697989"</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span><span style="color: #000000;">&#40;</span> contacomb <= combinaz <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> contacomb >= combinaz<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; c := <span style="color: #ff0000;">"C"</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> contacomb <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cnum := LTrim<span style="color: #000000;">&#40;</span> Trim<span style="color: #000000;">&#40;</span> &c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// < give me error here not found c1</span><br /><br />&nbsp; &nbsp; &nbsp; ? cnum &nbsp;<span style="color: #B900B9;">// perfecto</span><br /><br />&nbsp; &nbsp; &nbsp; conta := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">WHILE</span><span style="color: #000000;">&#40;</span> conta <= Len<span style="color: #000000;">&#40;</span> cnum <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;num &nbsp;:= <span style="color: #ff0000;">"N"</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> conta <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&num := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cnum, conta * <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> &num, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"0"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &num := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> &num, <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// No comprendo bien, mas funciona perfecto.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ? "Line 60/63: ", &num &nbsp;// numeros aleatorios.</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;conta := conta + <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp; &nbsp; contacomb := contacomb + <span style="color: #000000;">1</span> &nbsp;<span style="color: #B900B9;">// Incremental number. perfectoÿ</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// fin / end</span><br />&nbsp;</div>[/code:sap9d972] Regards, saludos.
Conversion from ca-clipper ( not found a variable)
Now The function run I insert Memvar but the experts of fwh / harbor / clipper have always recommended me not to use the memvar and then in the old source of ca-clipper they are local [img:17lsypyk]https&#58;//i&#46;postimg&#46;cc/Wbf9jW57/n&#46;png[/img:17lsypyk] problems: 1) first column I must divide the string into type XX.XX.XX.XX. how I can make ? 2) the other columns are -1 because are not calculate how I can make to show none ?
Conversion from ca-clipper ( not found a variable)
[quote:1sorfsom] the experts of fwh / harbor / clipper have always recommended me not to use the memvar and then in the old source of ca-clipper they are local [/quote:1sorfsom] Esta información es incorrecta. Puede DECLARAR las variables a voluntad. LOCAL // usar a voluntad GLOBAL // usar con moderación MEMVAR // usar a voluntad PRIVATE // úselo a voluntad, pero no lo use dentro de LOOPINGS, puede explotar la RAM PÚBLIC // Usar con moderación. Desafío a cualquier EXPERTO a que demuestre que estoy equivocado. De lo contrario, mi profesor CLIPPER 5.3 va a recibir una paliza. jajajajajajaja. This information is incorrect. You can DECLARE the variables at will. LOCAL // use at will GLOBAL // use sparingly MEMVAR // use at will PRIVATE // use it at will, just don't use it inside LOOPINGS, it can explode RAM PUBLIC // Use sparingly. I challenge any EXPERT to prove me wrong. Otherwise, my CLIPPER 5.3 teacher is going to take a beating. jajajajajajaja.
Conversion from ca-clipper ( not found a variable)
[quote:2f6frqbq] 1) first column I must divide the string into type XX.XX.XX.XX. how I can make ? 2) the other columns are -1 because are not calculate how I can make to show none ? [/quote:2f6frqbq] muéstranos un ejemplo práctico de cómo lo estás haciendo, no tengo idea de lo que quieres. show us a practical example of how you are doing it, i have no idea what you want. [code=fw:2f6frqbq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// ? VAL( CNUM )</span><br /><br />&nbsp; &nbsp; &nbsp; cValcNum := VAL<span style="color: #000000;">&#40;</span> CNUM <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; ? TRANSF<span style="color: #000000;">&#40;</span> cValcNum, <span style="color: #ff0000;">"99-99-99-99-99-99-99-99-99"</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2f6frqbq] Regards, saludos.