topic
stringlengths
1
63
text
stringlengths
1
577k
Calculation with an array
Having a total example € 3.50 I have to break it so you can turn on a series of buttons that have a different price I Explain You I have an array aImports:={200,100,50,20,10,5,3,2,1,0.50,0.20,0.10,0.05} every record relates to a button [img:t8txzeyw]https://i.postimg.cc/CLQLTLBL/prezzi.png[/img:t8txzeyw] if I have a total = 3.50 I have to wiper to turn on the buttons that 3.50 do in this case aImports[7] and aImports[10] How I can do to calculate it ?
Calculation with an array
hi Silvio, try this [code=fw:2zb4a5ei]<div class="fw" id="{CB}" style="font-family: monospace;">PROCEDURE BinCalc<span style="color: #000000;">&#40;</span>nValue<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> aImports:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0.50</span>,<span style="color: #000000;">0.20</span>,<span style="color: #000000;">0.10</span>,<span style="color: #000000;">0.05</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> nPosi := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nRest := nValue<br /><span style="color: #00C800;">LOCAL</span> aRet &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br />? &nbsp; &nbsp; nPosi := ASCAN<span style="color: #000000;">&#40;</span>aImports,<span style="color: #000000;">&#123;</span>|e| e <= nRest<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> nPosi > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span>aRet,nPosi<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRest -= aImports<span style="color: #000000;">&#91;</span>nPosi<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><span style="color: #00C800;">RETURN</span> aRet</div>[/code:2zb4a5ei]
Calculation with an array
THAKSSSS
Calculation with an array
[quote="Silvio.Falconi":349y8zuw]Having a total example € 3.50 I have to break it so you can turn on a series of buttons that have a different price I Explain You I have an array aImports:={200,100,50,20,10,5,3,2,1,0.50,0.20,0.10,0.05} every record relates to a button [img:349y8zuw]https&#58;//i&#46;postimg&#46;cc/CLQLTLBL/prezzi&#46;png[/img:349y8zuw] if I have a total = 3.50 I have to wiper to turn on the buttons that 3.50 do in this case aImports[7] and aImports[10] How I can do to calculate it ?[/quote:349y8zuw] only for curiosity: would you ever use a value of 3.90, 3.80, or 3.59 (among others)?
Calculation with an array
Silvio, I know you don't like it. But this programme would be a good sample to start with mod harbour. Many greetings Otto [url:3w1ljy4x]https&#58;//www&#46;facebook&#46;com/groups/modharbour&#46;club/?multi_permalinks=1090583058162587&notif_id=1648482958093104[/url:3w1ljy4x] [img:3w1ljy4x]https&#58;//mybergland&#46;com/fwforum/lotto&#46;gif[/img:3w1ljy4x]
Calculation with an array
Unfortunately, someone died during the pandemic. Now it happens that this someone had created a software for the bookstores and therefore it is not possible to update it. I'm just trying to see if I can redo the program. For many years I have been doing something but only classic statistics those you find on all websites, forecasts and combinatorial calculations and for about a month I have been implementing some systems of my own creation for the drafting of lottery games. What you see (the prices) is a small part of the whole I'm putting up, unfortunately I don't have much time, I have a job at school, and serious problems with my 90-year-old mother who causes me several problems so the creation of the software goes very slowly. Otto it is not true that I don't like it, it just annoys me that you always take my ideas to create tests with this mod_harbour that I am convinced that it will end with all the projects that have done and have not finished. But you dear Otto you do not know this, you are young in fwh and you think you are all "roses and flowers"
Calculation with an array
[quote="Jimmy":1bbvrnhz]hi Silvio, try this [code=fw:1bbvrnhz]<div class="fw" id="{CB}" style="font-family: monospace;">PROCEDURE BinCalc<span style="color: #000000;">&#40;</span>nValue<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> aImports:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0.50</span>,<span style="color: #000000;">0.20</span>,<span style="color: #000000;">0.10</span>,<span style="color: #000000;">0.05</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> nPosi := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nRest := nValue<br /><span style="color: #00C800;">LOCAL</span> aRet   := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br />?     nPosi := ASCAN<span style="color: #000000;">&#40;</span>aImports,<span style="color: #000000;">&#123;</span>|e| e <= nRest<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> nPosi > <span style="color: #000000;">0</span><br />         AADD<span style="color: #000000;">&#40;</span>aRet,nPosi<span style="color: #000000;">&#41;</span><br />         nRest -= aImports<span style="color: #000000;">&#91;</span>nPosi<span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">ELSE</span><br />         EXIT<br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDDO</span><br /><span style="color: #00C800;">RETURN</span> aRet</div>[/code:1bbvrnhz][/quote:1bbvrnhz] Jimmy this run good on Dialog [img:1bbvrnhz]https&#58;//i&#46;postimg&#46;cc/xTjwqJgj/di&#46;png[/img:1bbvrnhz] Because I have the totals [b:1bbvrnhz]on Vertical [/b:1bbvrnhz] Now the problem I have on Print the ticket because I have it on Horizontal [img:1bbvrnhz]https&#58;//i&#46;postimg&#46;cc/mkw9p6F9/dk&#46;png[/img:1bbvrnhz] and I not Know how make it the column are 11 the rows are 8 Pls Help
Calculator
The power of macros -one line of code and a powerful calculator is ready. Best regards, Otto [img:1hckr53j]http&#58;//www&#46;atzwanger-software&#46;com/fw/calcb&#46;jpg[/img:1hckr53j] [img:1hckr53j]http&#58;//www&#46;atzwanger-software&#46;com/fw/calca&#46;jpg[/img:1hckr53j] prg-file [code=fw:1hckr53j]<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 />   <span style="color: #00C800;">Local</span> oDlg<br />   <span style="color: #00C800;">Local</span> oGet<br />   <span style="color: #00C800;">local</span> cVar := space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">from</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span><br /><br />   @ <span style="color: #000000;">15</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">get</span> oGet <span style="color: #0000ff;">var</span> cVar <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"@!"</span>  bitmap <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\c</span>hkyes.bmp"</span> <span style="color: #0000ff;">action</span><span style="color: #000000;">&#40;</span> calc<span style="color: #000000;">&#40;</span> @cVar <span style="color: #000000;">&#41;</span>, oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />      <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span><br />   oGet:<span style="color: #000000;">lAdjustBtn</span> := .t.<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> calc<span style="color: #000000;">&#40;</span> cVar <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cTempCalc := cVar<br />   <span style="color: #00C800;">Try</span><br />   cVar := ALLTRIM<span style="color: #000000;">&#40;</span> str<span style="color: #000000;">&#40;</span> &cTempCalc <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br />   CATCH<br />   <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Wrong input"</span> <span style="color: #000000;">&#41;</span><br />   End<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1hckr53j] rc-file [code=fw:1hckr53j]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Add this to your resources RC file</span><br /><br />#ifdef __FLAT__<br />   <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">".<span style="color: #000000;">\w</span>inxp<span style="color: #000000;">\W</span>indowsXP.Manifest"</span><br />#endif<br /><br />#ifdef __64__<br />   <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WinXP/WindowsXP.Manifest64"</span><br />#endif <br /> </div>[/code:1hckr53j]
Calculator
Otto, Great contribution. Thanks. I have a similar one somewhere for dates. You can do, +7 (same day next week), +1 (tomorrow), etc. Regards, James
Calculator
nice too
Calculator in Get
Anyone have a sample of a calculator that can be included in a Get control which will return the value to the field ? Thanks.
Calculator in Get
Hi Tim, <!-- w --><a class="postlink" href="http://www.reportdesigner.info/downloads/GetCalc.zip">www.reportdesigner.info/downloads/GetCalc.zip</a><!-- w -->
Calculator in Get
Developed by Timm Sodtalbers: <!-- m --><a class="postlink" href="http://hyperupload.com/download/02dbcac645/GetCalc.zip.html">http://hyperupload.com/download/02dbcac ... c.zip.html</a><!-- m -->
Calculator in Get
Thanks. I'll work with that.
Calculator in Get
Hello Mr.Timm Simplest way of presenting big things. Your calculator is very simple and cute. Keep posting such good things. BTW I sent a small modification to your code to your email. Please check its accuracy. But I am getting the required results with this modification. Regards - Ramesh Babu P
Calculator in Get
Hi Antonio,I am interested in calculator get. Is it in 8.11 or external file? How Can I find it?Thanks,
Calculator in Get
[quote="Antonio Linares":540unsy8]Developed by Timm Sodtalbers: <!-- m --><a class="postlink" href="http://hyperupload.com/download/02dbcac645/GetCalc.zip.html">http://hyperupload.com/download/02dbcac ... c.zip.html</a><!-- m -->[/quote:540unsy8]Antonio, no he podido acceder al link.
Calculator in Get
We have contacted Timm Sodtalbers to get that file again.Hemos contactado con Timm Sodtalbers para conseguir ese fichero de nuevo.
Calculator in Get
[quote="Antonio Linares":2k9gwd8m]We have contacted Timm Sodtalbers to get that file again. Hemos contactado con Timm Sodtalbers para conseguir ese fichero de nuevo.[/quote:2k9gwd8m]gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Calculator in Get
Thanks
Calculator in Get
Hi!You will find that file here:<!-- w --><a class="postlink" href="http://www.reportdesigner.info/downloads/GetCalc.zip">www.reportdesigner.info/downloads/GetCalc.zip</a><!-- w -->
Calculator in Get
Timm,Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->We have placed a copy of it in:<!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/utilities/getcalc.zip">www.fivetechsoft.com/files/utilities/getcalc.zip</a><!-- w -->
Calculator in Get
[quote="Timm Sodtalbers":31mio4x2]Hi! You will find that file here: <!-- w --><a class="postlink" href="http://www.reportdesigner.info/downloads/GetCalc.zip">www.reportdesigner.info/downloads/GetCalc.zip</a><!-- w -->[/quote:31mio4x2]Tim, It is a nice contribution, thanks!!!Just one thing:[b:31mio4x2]For recent versions of fivewin (tget is modified) you will need to comment this lines or result wil be wrong.[/b:31mio4x2][code:31mio4x2] FUNCTION SC_FormulaString&#40; oGet &#41; &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; /* IF nLastKey <> 8 cBuffer &#58;= STUFF&#40; cBuffer, oGet&#58;nPos, 0, CHR&#40; nLastKey &#41; &#41; ENDIF */ &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; [/code:31mio4x2]Thanks again!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Calculator in Get
Thanks Timm
Calculator in Get
Maestro, que error és este? [code=fw:33ws2ck0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">c</span>:\FWH1306\samples\GETCALC.exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">2</span>,<span style="color: #000000;">438</span>,<span style="color: #000000;">656</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Build <span style="color: #000000;">20130422</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">13.05</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7601</span> Service Pack <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">0</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">05</span>/<span style="color: #000000;">23</span>/<span style="color: #000000;">14</span>, <span style="color: #000000;">11</span>:<span style="color: #000000;">34</span>:<span style="color: #000000;">25</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span> &nbsp;<span style="color: #00C800;">Class</span>: <span style="color: #ff0000;">'NIL'</span> has no exported <span style="color: #00C800;">method</span>: <span style="color: #000000;">OGET</span><br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U &nbsp; <br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> OGET<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">GETCALC</span>.prg => SHOWCALCULATOR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">48</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:33ws2ck0] Gracias, saludos.
Calculator in Get
maestro, que error és este? <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=17&t=3961">viewtopic.php?f=17&t=3961</a><!-- l --> Gracias, saludos.
Calculator in Get
Joao, Please try this: [code=fw:25uhu17m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />&nbsp; &nbsp; =================================================================================<br />&nbsp; &nbsp; GetCalc.prg - PopUp-Calculator &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (c) copyright: Timm Sodtalbers, 2003<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;info@reportdesigner.info<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!-- w --><a class="postlink" href="http://www.reportdesigner.info">www.reportdesigner.info</a><!-- w --><br />&nbsp; &nbsp; ---------------------------------------------------------------------------------<br /><br />&nbsp; &nbsp; In order to activate the PopUp-Calculator when pressing the space key in numeric<br />&nbsp; &nbsp; fields just add this lines in the KeyDown method of the tGet class:<br /><br />&nbsp; &nbsp; &nbsp; case nKey == VK_SPACE .AND. ::oGet:Type == "N"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ShowCalculator( SELF )<br /><br />&nbsp; &nbsp; or if you only want to use the calculator with certain get fields:<br /><br />&nbsp; &nbsp; &nbsp; oGet:bKeyDown = {|nKey| IIF( nKey == VK_SPACE, ShowCalculator( oGet ), .T. ) }<br /><br />&nbsp; &nbsp; History:<br />&nbsp; &nbsp; 24.6.2003 - if the get field is <> 0 its value will be copied into the calculator<br />&nbsp; &nbsp; 22.6.2003 - first release<br /><br />&nbsp; &nbsp; =================================================================================<br />*/</span><br /><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#DEFINE</span> SC_TITLE &nbsp; <span style="color: #ff0000;">" Fórmula:"</span><br /><span style="color: #00D7D7;">#DEFINE</span> SC_ERROR1 &nbsp;<span style="color: #ff0000;">"El resultado no cabe dentro del campo."</span><br /><span style="color: #00D7D7;">#DEFINE</span> SC_ERROR2 &nbsp;<span style="color: #ff0000;">"El valor es incorrecto."</span><br /><span style="color: #00D7D7;">#DEFINE</span> SC_ERROR3 &nbsp;<span style="color: #ff0000;">"valor incorrecto"</span><br /><span style="color: #00D7D7;">#DEFINE</span> SC_STOP &nbsp; &nbsp;<span style="color: #ff0000;">"A T E N C I Ó N"</span><br /><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oGet, oGet2<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cCad := <span style="color: #ff0000;">"Testing &nbsp; &nbsp;"</span> <span style="color: #B900B9;">// pad("Testing Gets",40)</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nNum := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dDat := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Set century <span style="color: #0000ff;">On</span><br />&nbsp; &nbsp;Set Date Ansi<br />&nbsp; &nbsp;Set Date format <span style="color: #ff0000;">"mm/dd/yyyy"</span><br /><br />&nbsp; &nbsp;SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TGet from "</span> + FWDESCRIPTION<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, &nbsp; &nbsp;<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Text..:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, &nbsp; &nbsp;<span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cCad <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W/G"</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1.8</span>, &nbsp;<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Number:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, &nbsp; &nbsp;<span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oGet2 <span style="color: #0000ff;">VAR</span> nNum <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9,999,999.99"</span><br />oGet2:<span style="color: #000000;">bKeyDown</span> = <span style="color: #000000;">&#123;</span>|nKey| IIF<span style="color: #000000;">&#40;</span> nKey == VK_SPACE, ShowCalculator<span style="color: #000000;">&#40;</span> oGet2 <span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2.6</span>, &nbsp;<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Date:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>, &nbsp; &nbsp;<span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> dDat <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@E"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">10</span> &nbsp;<span style="color: #B900B9;">// "@D"</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>, &nbsp; &nbsp;<span style="color: #000000;">7</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>, &nbsp; <span style="color: #000000;">16</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// TGet():SetColorFocus( nRGB( 200, 120, 120 ) )</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br />*-- <span style="color: #00C800;">FUNCTION</span> -----------------------------------------------------------------<br />* &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">ShowCalculator</span><br />* &nbsp;Description:<br /><span style="color: #000000;">*</span> &nbsp; &nbsp; &nbsp; Author: <span style="color: #000000;">Timm</span> Sodtalbers<br />*-----------------------------------------------------------------------------<br /><span style="color: #00C800;">FUNCTION</span> ShowCalculator<span style="color: #000000;">&#40;</span> oCurGet <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oBtn, oGet1, oSay1, aResult<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lTake &nbsp; &nbsp;:= .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cBuffer &nbsp;:= oCurGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Buffer</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nHorzRes := GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oGetRect := oCurGet:<span style="color: #000000;">GetRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nTop &nbsp; &nbsp; := oGetRect:<span style="color: #000000;">nTop</span> - <span style="color: #000000;">62</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLeft &nbsp; &nbsp;:= IIF<span style="color: #000000;">&#40;</span> oGetRect:<span style="color: #000000;">nRight</span> + <span style="color: #000000;">126</span> > nHorzRes, nHorzRes - <span style="color: #000000;">212</span>, oGetRect:<span style="color: #000000;">nLeft</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nDezimal := IIF<span style="color: #000000;">&#40;</span> oCurGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">DecPos</span> = <span style="color: #000000;">-1</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span>, LEN<span style="color: #000000;">&#40;</span> oCurGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Buffer</span> <span style="color: #000000;">&#41;</span> - oCurGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">DecPos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cFormula := IIF<span style="color: #000000;">&#40;</span> VAL<span style="color: #000000;">&#40;</span> cBuffer <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span>, <span style="color: #ff0000;">""</span>, ALLTRIM<span style="color: #000000;">&#40;</span> cBuffer <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">200</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> SC_TITLE <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">7</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">9</span>, <span style="color: #000000;">104</span>, <span style="color: #000000;">168</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">9</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cFormula <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">98</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@S100"</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> .NOT. EMPTY<span style="color: #000000;">&#40;</span> cBuffer <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oGet1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> LEN<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span> cFormula <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;oGet1:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span>|| SC_Result<span style="color: #000000;">&#40;</span> SC_FormulaString<span style="color: #000000;">&#40;</span> oGet1 <span style="color: #000000;">&#41;</span>, nDezimal, cBuffer, oSay1 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">21</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> oSay1 <span style="color: #0000ff;">PROMPT</span> ALLTRIM<span style="color: #000000;">&#40;</span> cFormula <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">98</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">COLOR</span> CLR_GRAY <span style="color: #0000ff;">RIGHT</span><br /><br />&nbsp; &nbsp;#IFDEF __HARBOUR__<br />&nbsp; &nbsp; &nbsp; oGet1:<span style="color: #000000;">bKeyDown</span> = <span style="color: #000000;">&#123;</span>|nKey,nFlags| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IIF<span style="color: #000000;">&#40;</span> nKey == VK_RETURN, <span style="color: #000000;">&#40;</span> oGet1:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span>|| .T. <span style="color: #000000;">&#125;</span>, lTake := .T., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;#ELSE<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">9</span>, <span style="color: #000000;">120</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"..."</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style="color: #000000;">bGotFocus</span> = <span style="color: #000000;">&#123;</span>|| lTake := .T., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;#ENDIF<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> nTop, nLeft, <span style="color: #000000;">210</span>, <span style="color: #000000;">62</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lTake = .T. .AND. .NOT. EMPTY<span style="color: #000000;">&#40;</span> cFormula <span style="color: #000000;">&#41;</span> .AND. oCurGet:<span style="color: #000000;">lFocused</span> = .T.<br /><br />&nbsp; &nbsp; &nbsp; aResult := SC_Result<span style="color: #000000;">&#40;</span> cFormula, nDezimal, cBuffer <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> aResult<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCurGet:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> aResult<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCurGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgStop<span style="color: #000000;">&#40;</span> aResult<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, SC_STOP <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br /><br />*-- <span style="color: #00C800;">FUNCTION</span> -----------------------------------------------------------------<br />* &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">SC_Result</span><br />* &nbsp;Description:<br /><span style="color: #000000;">*</span> &nbsp; &nbsp; &nbsp; Author: <span style="color: #000000;">Timm</span> Sodtalbers<br />*-----------------------------------------------------------------------------<br /><span style="color: #00C800;">FUNCTION</span> SC_Result<span style="color: #000000;">&#40;</span> cFormula, nDezimal, cBuffer, oSay <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nValue<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cError := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;cFormula := STRTRAN<span style="color: #000000;">&#40;</span> cFormula, <span style="color: #ff0000;">","</span>, <span style="color: #ff0000;">"."</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> TYPE<span style="color: #000000;">&#40;</span> cFormula <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"N"</span><br /><br />&nbsp; &nbsp; &nbsp; nValue := &<span style="color: #000000;">&#40;</span> cFormula <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span> cBuffer <span style="color: #000000;">&#41;</span> < LEN<span style="color: #000000;">&#40;</span> ALLTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> nValue, <span style="color: #000000;">100</span>, nDezimal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cError := SC_ERROR1<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; cError := SC_ERROR2<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> oSay <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> IIF<span style="color: #000000;">&#40;</span> EMPTY<span style="color: #000000;">&#40;</span> cError<span style="color: #000000;">&#41;</span>, ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span> nValue, <span style="color: #000000;">100</span>, nDezimal <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, SC_ERROR3 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#123;</span> nValue, cError <span style="color: #000000;">&#125;</span><br /><br /><br />*-- FUNCTION------------------------------------------------------------------<br />* &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">SC_FormulaString</span><br />* &nbsp;Description:<br /><span style="color: #000000;">*</span> &nbsp; &nbsp; &nbsp; Author: <span style="color: #000000;">Timm</span> Sodtalbers<br />*-----------------------------------------------------------------------------<br /><span style="color: #00C800;">FUNCTION</span> SC_FormulaString<span style="color: #000000;">&#40;</span> oGet <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cBuffer &nbsp;:= ALLTRIM<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLastKey := oGet:<span style="color: #000000;">nLastKey</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nLastKey > <span style="color: #000000;">96</span> .AND. nLastKey < <span style="color: #000000;">116</span><br />&nbsp; &nbsp; &nbsp; nLastKey := nLastKey - <span style="color: #000000;">96</span> + <span style="color: #000000;">48</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp;IF nLastKey <> 8<br />&nbsp; &nbsp; &nbsp; cBuffer := STUFF( cBuffer, oGet:nPos, 0, CHR( nLastKey ) )<br />&nbsp; &nbsp;ENDIF<br />*/</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> cBuffer <span style="color: #000000;">&#41;</span></div>[/code:25uhu17m]
Calculator in Get
Joao, Que código hay en esta línea ? Called from: GETCALC.prg => SHOWCALCULATOR( 48 )
Calculator in Get
Gracias Lucas, funcionó perfecto. Very Thanks!! Regards, saludos.
Calculator in Get
LOCAL cBuffer := oCurGet:oGet:Buffer saludos Wilson
Calculator in Get
Una posible solución seria (a falta de saber porque ese valor llega nil): LOCAL cBuffer := If( oCurGet != nil, oCurGet:oGet:Buffer, "" ) // ó nil, según se necesite
Calculator in Get
[quote="Antonio Linares":3slgdl94]Una posible solución seria (a falta de saber porque ese valor llega nil): LOCAL cBuffer := If( oCurGet != nil, oCurGet:oGet:Buffer, "" ) // ó nil, según se necesite[/quote:3slgdl94] Maestro, también no funciona. Resuelto asi: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=28497">viewtopic.php?f=6&t=28497</a><!-- l --> Gracias, salu2.
Calculator in Get
Hola, Usandolo desde la lausula ACTION ,Con este codigo no funciona. [code=fw:51y77i8e]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> aDatos<span style="color: #000000;">&#91;</span> _PRECIO <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">203</span> <span style="color: #0000ff;">OF</span> oDlg;<br />    <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@E 999,999.99"</span>;<br />    BITMAP ovarsis:<span style="color: #000000;">BitMap</span><span style="color: #000000;">&#91;</span> BMP_GETCALC <span style="color: #000000;">&#93;</span>;<br />    <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> ShowCalculator<span style="color: #000000;">&#40;</span>oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:51y77i8e] Da el siguiente error : [code=fw:51y77i8e]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\TGET.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGET_CREATEBUTTON<span style="color: #000000;">&#40;</span> <span style="color: #000000;">487</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:51y77i8e]
Calculator in Get
REDEFINE GET oGet[4] VAR aDatos[ _PRECIO ] ID 203 OF oDlg PICTURE "@E 999,999.99" oGet[4] :bKeyDown = {|nKey| IIF( nKey == VK_SPACE, ShowCalculator(oGet[4] ), .T. ) } the user must only press space bar when the cursor is in this get
Calculator in Get
Silvio, Ya lo habia probado de esa manera. Lo que queria era probarlo desde un boton en el GET. Saludos,
Calculator revisited
A client recently updated from a DOS version of my software to the Windows version. ( waited 15 years to do so ). He is obsessed with the fact that he had a calculator in GET fields in the DOS version ( some people just can't let go ). I don't have it in those fields under Windows because a lot of the fields trigger lookups or automatic processes. However, I'm thinking maybe it would help to have one. Mine are old so they would need to be revised to look clean in Windows. Does anyone have an implementation of a calculator for GET fields ? It might be a nice addition to the GET control ... Thanks.
Calculator revisited
Hello, I use getcalc from Tim Sodtalbergs <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=71631">viewtopic.php?p=71631</a><!-- l --> Regards,
Calculator revisited
Tim, You can implement it quite easily using: ... GET ... ACTION WinExec( "calculator" ) If it is fine for you, then I help you to recover the value shown. Of course it is even better to use a FWH calculator. Please try MsgCalc() from FWH
Calculator revisited
Or Timm's class which seems to work very fine: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=159435#p159435">viewtopic.php?p=159435#p159435</a><!-- l --> the solution that you prefer <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Calculator revisited
Hi Antonio, Right now I'm using an inline GET calculator. I would love to see how to recover the value from the WIndows Calculator since it's traditional. I'm also going to play with MsgCalc( ) which might work out. Thanks.
Calculator revisited
Tim, The problem with the Windows calculator is that unless the user press the "copy" menu option in the calculator, its value will not be saved. If clicked, then we can retrieve its value from the clipboard. Its easy <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Calculator revisited
OK ... I took MsgCalc and re-did the layout a bit to be more conforming to my program ... so it's consistent with the existing fonts / brush etc. I will work OK ... One quick question. I have a bitmap within a get ... no problem. However, would it be possible to put 2 bitmaps in there with 2 different action statements ? Thanks
Calculator revisited
Tim, [quote:3i6irm1q]One quick question. I have a bitmap within a get ... no problem. However, would it be possible to put 2 bitmaps in there with 2 different action statements ?[/quote:3i6irm1q] Gee, give him the moon and he wants the stars. Maybe you could just put a button next to the Get for the second action. James
Calculator revisited
James, We need to do lunch ! Oh ... I have the button next to the get already. It works fine, but I have a crotchety old client who likes to point out its "different" Tim
Calculator revisited
Tim, [quote:34v8bal3]We need to do lunch ![/quote:34v8bal3] We do. Let me know when you are going to be in Carlsbad next time. [quote:34v8bal3]Oh ... I have the button next to the get already. It works fine, but I have a crotchety old client who likes to point out its "different"[/quote:34v8bal3] My philosophy is to ignore them and they eventually give up. Or, offer to work on it for an (inflated) hourly fee--that usually changes their mind on how important it is. In this case you could just tell them that this is not a Windows standard design and thus you can't support it anymore. James
Calculator revisited
This is a rather funny situation. The guy has been running the DOS system forever, and kept "not updating" to the Windows version until the XP issue arose. However, he paid all those (15) years for the updates ... so he has "sort of paid" for some special attention. I'm in Carlsbad often.
Calculator revisited
May be usefull to you: [code=fw:1b73zsde]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />&nbsp; TCALC.PRG &nbsp; <br />&nbsp; CLASE QUE PERMITE PONER UNA CALCULADORA CON ROLLO DE PAPEL VIRTUAL.<br />&nbsp; Necesita el fichero de recursos: TCALC.RC<br /><br />&nbsp; Primera Versión: Junio del 2007 DC<br />&nbsp; Ultima Revisión: 23/09/2007<br />&nbsp; Autor: Verhoven. &nbsp;¡ Seguro les resultará de utilidad !<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.- Queda autorizado su libre distribucion y uso, incluso con fines comerciales . <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.- El autor declina cualquier responsabilidad en caso de funcionamiento anómalo.<br /><br />&nbsp; Ejemplo: Hacemos una calculadora que se active pulsando F12:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Para incluirla en un programa basta con poner después de la función main() del mismo.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#include 'TCALC.PRG'<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public oCalc:=tCalc():new()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setkey(VK_F12, {|| oCalc:calculadora(oWnd,'@E 9,999,999.9999 ')})<br />&nbsp; <br />&nbsp; Vea el significado de las variables de instancia y de las que se les pasan a los métodos para <br />&nbsp; &nbsp;aprovechar algunas posibilidades de configuración.<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">CLASS</span> TCalc<br />&nbsp;<span style="color: #00C800;">DATA</span> nResult &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//Resultado de las operaciones en curso. &nbsp; &nbsp;</span><br />&nbsp;<span style="color: #00C800;">DATA</span> aRolloCalc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Operaciones realizadas desde la última vez que se borró todo.</span><br />&nbsp;<br />&nbsp;<span style="color: #00C800;">DATA</span> cUltima, cUltimaop &nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">DATA</span> cPatronSalida &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// cPatronSalida &nbsp;-> Formato en que se pinta el resultado. &nbsp; &nbsp;</span><br />&nbsp; &nbsp; <br />&nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> nCalculadigual<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> calculadora<span style="color: #000000;">&#40;</span>oPadre,cPatronSalida,lBorraAlInicio<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// lBorraAlInicio -> Al llamar al método si está en .t. borra lo que hubiera.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Si está en .f. ó NIL conserva las operaciones anteriores.</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> TCalc_Teclas<span style="color: #000000;">&#40;</span>nKey, oDlg<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br />&nbsp;::<span style="color: #000000;">aRolloCalc</span>:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'C'</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> &nbsp; <br />&nbsp;::<span style="color: #000000;">nResult</span> &nbsp; :=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;<br />&nbsp;::<span style="color: #000000;">cUltima</span> &nbsp; :=<span style="color: #ff0000;">''</span><br />&nbsp;::<span style="color: #000000;">cUltimaop</span> :=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">SELF</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br />&nbsp;::<span style="color: #000000;">aRolloCalc</span>:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'C'</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br />&nbsp;::<span style="color: #000000;">nResult</span> &nbsp; :=<span style="color: #000000;">0</span><br /><br />&nbsp;::<span style="color: #000000;">cUltima</span> &nbsp; :=<span style="color: #ff0000;">''</span><br />&nbsp;::<span style="color: #000000;">cUltimaop</span> :=<span style="color: #ff0000;">''</span> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> calculadora<span style="color: #000000;">&#40;</span>oPadre,cPatronSalida,lBorraAlInicio<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oBtnSalir<br /><span style="color: #00C800;">local</span> oBtnmenos, oBtnmas, oBtnpor, oBtndividir, oBtnigual, oBtnBorra<br /><span style="color: #00C800;">local</span> oBtn0, oBtn1, oBtn2, oBtn3, oBtn4, oBtn5, oBtn6, oBtn7, oBtn8, oBtn9, oBtnP, oBtnSigno<br /><span style="color: #00C800;">local</span> oBtnConv, oBtnConv2<br /><span style="color: #00C800;">local</span> oBtnDel<br /><span style="color: #00C800;">local</span> oSay<br /><span style="color: #00C800;">local</span> oBrw, n:=<span style="color: #000000;">1</span><br /><span style="color: #00C800;">local</span> oGet, nGet:=<span style="color: #000000;">0</span> ,cGet:=<span style="color: #ff0000;">''</span>, nGetAnt:=<span style="color: #000000;">0</span><br /><span style="color: #00C800;">local</span> oFont1<br /><span style="color: #00C800;">local</span> oFontLst<br /><br /><span style="color: #00C800;">if</span> cPatronSalida=<span style="color: #00C800;">NIL</span> .and. ::<span style="color: #000000;">cPatronSalida</span>=<span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;cPatronSalida:=<span style="color: #ff0000;">'@E 9,999,999,999.99 '</span> &nbsp;<span style="color: #B900B9;">//Formato en que se pinta el resultado.</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #B900B9;">//default cPatronSalida:='@E 9,999,999,999.99 ' &nbsp;//Formato en que se pinta el resultado.</span><br /><span style="color: #00C800;">default</span> lBorraAlInicio :=.f. &nbsp;<span style="color: #B900B9;">// Al llamar al método si está en .t. borra lo que hubiera.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;Si está en .f. entonces conserva las operaciones anteriores.</span><br /><br />::<span style="color: #000000;">cPatronSalida</span>:=cPatronSalida<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 &nbsp; <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-20</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontLst <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">'Calculadora'</span> <span style="color: #0000ff;">OF</span> oPadre <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'CALCULADORA'</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnSalir <span style="color: #0000ff;">ID</span> <span style="color: #000000;">500</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'SALIR'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">default</span> CANCEL <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnSalir:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'S'</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnmenos <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Resta'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span>nGetAnt:=nGet,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'-'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>-nGetAnt,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span>,::<span style="color: #000000;">nResult</span>,nGetAnt<span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'-'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>-nGet<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'-'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnmenos:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'-'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnmas &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">402</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Suma'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span>nGetAnt:=nGet,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'+'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>+nGetAnt,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span>,::<span style="color: #000000;">nResult</span>,nGetAnt<span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'+'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>+nGet<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'+'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnmas:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'+'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnpor &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">403</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Multiplica'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, iif<span style="color: #000000;">&#40;</span>nGet=<span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">nResult</span><><span style="color: #000000;">0</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'x'</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'x'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult*nGet</span>,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'*'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnpor:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'*'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtndividir <span style="color: #0000ff;">ID</span> <span style="color: #000000;">404</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Divide'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, iif<span style="color: #000000;">&#40;</span>nGet=<span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">nResult</span><><span style="color: #000000;">0</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'/'</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'/'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>/nGet,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'/'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtndividir:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'/'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnigual &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">405</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Calcula resultado'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>nGet=<span style="color: #000000;">0</span>,,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'+'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'-'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'*'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'/'</span>,<span style="color: #ff0000;">' '</span>,::<span style="color: #000000;">cUltimaOp</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nCalculadIgual</span><span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'='</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'='</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGetAnt:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnigual:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'='</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnBorra <span style="color: #0000ff;">ID</span> <span style="color: #000000;">425</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Borra todos los cálculos'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> aSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">'C'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'R'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'0'</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnBorra:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'R'</span>&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnDel <span style="color: #0000ff;">ID</span> <span style="color: #000000;">426</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Borra último dígito'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'CE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span>cGet,len<span style="color: #000000;">&#40;</span>cget<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnDel:<span style="color: #000000;">cargo</span>:=chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnConv <span style="color: #0000ff;">ID</span> <span style="color: #000000;">407</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Convierte de euros a PTS'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>nGet*<span style="color: #000000;">166.386</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult*</span><span style="color: #000000;">166.386</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999 &nbsp; &nbsp; &nbsp;'</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'pts'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'AP'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; &nbsp;<span style="color: #B900B9;">// AP = a Pesetas</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999 pts'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnConv:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'E'</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnConv2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">408</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Convierte de PTS a Euro'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>nGet/<span style="color: #000000;">166.386</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>/<span style="color: #000000;">166.386</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999.99 '</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">' €'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'AE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; &nbsp;<span style="color: #B900B9;">// AE = a Euros</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999.99 €'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnConv:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'P'</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn0 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'0'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span> .or. <span style="color: #00C800;">at</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>,cGet<span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn0:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'0'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'1'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn1:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'1'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'2'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn2:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'2'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn3 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'3'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn3:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'3'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn4 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'4'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn4:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'4'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn5 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'5'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn5:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'5'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn6 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'6'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn6:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'6'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn7 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">107</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'7'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn7:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'7'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn8 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">108</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'8'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn8:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'8'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn9 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'9'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn9:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'9'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnP &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'.'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> int<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span>==nGet <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnP:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'.'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnSigno <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'signo'</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*nGet &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnSigno:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">' '</span> &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oGet <span style="color: #0000ff;">VAR</span> nGet <span style="color: #0000ff;">ID</span> <span style="color: #000000;">211</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont1 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> nrgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, &nbsp;<span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">nResult</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont1 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrw FIELDS ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aRolloCalc</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aRolloCalc</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEAD <span style="color: #ff0000;">'valor'</span>,<span style="color: #ff0000;">' '</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">212</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFontLst <span style="color: #0000ff;">COLOR</span> &nbsp;nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span> ;<span style="color: #B900B9;">//clrLtrBrow,clrFonBrow ;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">aJustify</span> &nbsp;:=<span style="color: #000000;">&#123;</span>.t.,.f.<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">aColSizes</span> :=<span style="color: #000000;">&#123;</span>GetFontInfo<span style="color: #000000;">&#40;</span>oFontLst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> * <span style="color: #000000;">1.25</span> * <span style="color: #000000;">17</span>, GetFontInfo<span style="color: #000000;">&#40;</span>oFontLst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> * <span style="color: #000000;">1.25</span> * <span style="color: #000000;">3</span><span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//aMatrizTc({17,3},oFontLst)</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bGotop</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || n := <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bGoBottom</span> := <span style="color: #000000;">&#123;</span> || n := eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bLogicLen</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bSkip</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> | nwant, nold | nold := n , n += nwant,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n := <span style="color: #0000ff;">max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #0000ff;">min</span><span style="color: #000000;">&#40;</span> n, eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bLogicLen</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n - nOld <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bLogicLen</span> := <span style="color: #000000;">&#123;</span> || len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">nClrPane</span>:=<span style="color: #000000;">&#123;</span>|| iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span><span style="color: #000000;">&#91;</span>n<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: #ff0000;">'='</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">200</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">125</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><br />&nbsp; &nbsp; oDlg:<span style="color: #000000;">bKeyDown</span>:=<span style="color: #000000;">&#123;</span>|nKey| ::<span style="color: #000000;">TCalc_Teclas</span><span style="color: #000000;">&#40;</span>nKey,oDlg<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span><span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>lBorraAlInicio,oBtnBorra:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,.f.<span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oFont1:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oFontLst:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> ::<span style="color: #000000;">nResult</span><br /><br /><span style="color: #00C800;">METHOD</span> nCalculadigual<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br />&nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; <span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'-'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> - nGet<br />&nbsp; &nbsp; <span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'+'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> + nGet<br />&nbsp; &nbsp; <span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'*'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> * nGet<br />&nbsp; &nbsp; <span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'/'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> / nGet<br />&nbsp;<span style="color: #00C800;">endcase</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> TCalc_Teclas<span style="color: #000000;">&#40;</span>nKey, oDlg<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> TCalc<br />&nbsp;<span style="color: #00C800;">local</span> ny<br />&nbsp;<span style="color: #00C800;">for</span> ny:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">if</span> oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>ny<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cargo</span>==upper<span style="color: #000000;">&#40;</span>chr<span style="color: #000000;">&#40;</span>nKey<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>ny<span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;<span style="color: #00C800;">next</span> ny<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1b73zsde]
Calculator revisited
Necesita el fichero de recursos: TCALC.RC Regards,
Calculator revisited
Aquí lo copio: [code=fw:1x5yknyq]<div class="fw" id="{CB}" style="font-family: monospace;">Calculadora <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">198</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">209</span>, <span style="color: #000000;">176</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME<br />CAPTION <span style="color: #ff0000;">"CALCULADORA"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&1"</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&2"</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&4"</span>, <span style="color: #000000;">104</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&5"</span>, <span style="color: #000000;">105</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&6"</span>, <span style="color: #000000;">106</span>, <span style="color: #000000;">142</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&3"</span>, <span style="color: #000000;">103</span>, <span style="color: #000000;">142</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&7"</span>, <span style="color: #000000;">107</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&8"</span>, <span style="color: #000000;">108</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&9"</span>, <span style="color: #000000;">109</span>, <span style="color: #000000;">142</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&."</span>, <span style="color: #000000;">110</span>, <span style="color: #000000;">142</span>, <span style="color: #000000;">129</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">212</span>, <span style="color: #ff0000;">"TWBrowse"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, <span style="color: #000000;">4</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">163</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&-"</span>, <span style="color: #000000;">401</span>, <span style="color: #000000;">161</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&0"</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">129</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&*"</span>, <span style="color: #000000;">403</span>, <span style="color: #000000;">161</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&SALIR"</span>, <span style="color: #000000;">500</span>, <span style="color: #000000;">167</span>, <span style="color: #000000;">155</span>, <span style="color: #000000;">39</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&+"</span>, <span style="color: #000000;">402</span>, <span style="color: #000000;">161</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&/"</span>, <span style="color: #000000;">404</span>, <span style="color: #000000;">161</span>, <span style="color: #000000;">129</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&="</span>, <span style="color: #000000;">405</span>, <span style="color: #000000;">179</span>, <span style="color: #000000;">129</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&RC"</span>, <span style="color: #000000;">425</span>, <span style="color: #000000;">179</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"CE"</span>, <span style="color: #000000;">426</span>, <span style="color: #000000;">179</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"+ / -"</span>, <span style="color: #000000;">111</span>, <span style="color: #000000;">179</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"a &PTS"</span>, <span style="color: #000000;">407</span>, <span style="color: #000000;">176</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">27</span>, <span style="color: #000000;">14</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"a &Euros"</span>, <span style="color: #000000;">408</span>, <span style="color: #000000;">148</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">27</span>, <span style="color: #000000;">14</span><br />&nbsp;RTEXT <span style="color: #ff0000;">"Text"</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">109</span>, <span style="color: #000000;">49</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">13</span><br />&nbsp;RTEXT <span style="color: #ff0000;">"Text"</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">71</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">13</span>, SS_RIGHT | WS_BORDER | WS_GROUP<br />&nbsp;RTEXT <span style="color: #ff0000;">"Resultado ="</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">39</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span><br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"static"</span>, SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">108</span>, <span style="color: #000000;">67</span>, <span style="color: #000000;">98</span>, <span style="color: #000000;">80</span><br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"static"</span>, SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">108</span>, <span style="color: #000000;">39</span>, <span style="color: #000000;">98</span>, <span style="color: #000000;">26</span><br />&nbsp;GROUPBOX <span style="color: #ff0000;">"Conversor"</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">62</span>, <span style="color: #000000;">26</span>, BS_GROUPBOX<br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:1x5yknyq]
Calculator revisited
Está escrito con el WorkShop. It was written with WorkShop.
Calculator revisited
Receiving syntax errors for oBtnDel and oBtn0. When commenting those out, it will build. I suspect the problems are in the IIF( ) syntax, but I'm not sure yet what goes where. Thanks.
Calculator revisited
Very Good!! [code=fw:1ibo3gi4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br />&nbsp; TCALC.PRG &nbsp; <br />&nbsp; CLASE QUE PERMITE PONER UNA CALCULADORA CON ROLLO DE PAPEL VIRTUAL.<br />&nbsp; Necesita el fichero de recursos: TCALC.RC<br /><br />&nbsp; Primera Versión: Junio del 2007 DC<br />&nbsp; Ultima Revisión: 23/09/2007<br />&nbsp; Autor: Verhoven. &nbsp;¡ Seguro les resultará de utilidad !<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.- Queda autorizado su libre distribucion y uso, incluso con fines comerciales . <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.- El autor declina cualquier responsabilidad en caso de funcionamiento anómalo.<br /><br />&nbsp; Ejemplo: Hacemos una calculadora que se active pulsando F12:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Para incluirla en un programa basta con poner después de la función main() del mismo.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#include 'TCALC.PRG'<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public oCalc:=tCalc():new()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setkey(VK_F12, {|| oCalc:calculadora(oWnd,'@E 9,999,999.9999 ')})<br />&nbsp; <br />&nbsp; Vea el significado de las variables de instancia y de las que se les pasan a los métodos para <br />&nbsp; &nbsp;aprovechar algunas posibilidades de configuración.<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PUBLIC</span> oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">PUBLIC</span> oCalc:=tCalc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br /><br />&nbsp; &nbsp;setkey<span style="color: #000000;">&#40;</span> VK_F12, <span style="color: #000000;">&#123;</span> || oCalc:<span style="color: #000000;">calculadora</span><span style="color: #000000;">&#40;</span> oWnd, <span style="color: #ff0000;">'@E 9,999,999.9999 '</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Press <F12> to Calculator"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">OF</span> oWnd<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Press <F12> to Calculator"</span> NOINSET CLOCK DATE KEYBOARD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">CLASS</span> TCalc<br />&nbsp;<span style="color: #00C800;">DATA</span> nResult &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//Resultado de las operaciones en curso. &nbsp; &nbsp;</span><br />&nbsp;<span style="color: #00C800;">DATA</span> aRolloCalc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Operaciones realizadas desde la última vez que se borró todo.</span><br />&nbsp;<br />&nbsp;<span style="color: #00C800;">DATA</span> cUltima, cUltimaop &nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">DATA</span> cPatronSalida &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// cPatronSalida &nbsp;-> Formato en que se pinta el resultado. &nbsp; &nbsp;</span><br />&nbsp; &nbsp; <br />&nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> nCalculadigual<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> calculadora<span style="color: #000000;">&#40;</span>oPadre,cPatronSalida,lBorraAlInicio<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// lBorraAlInicio -> Al llamar al método si está en .t. borra lo que hubiera.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Si está en .f. ó NIL conserva las operaciones anteriores.</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #00C800;">METHOD</span> TCalc_Teclas<span style="color: #000000;">&#40;</span>nKey, oDlg<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">aRolloCalc</span>:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'C'</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nResult</span> &nbsp; :=<span style="color: #000000;">0</span><br />&nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">cUltima</span> &nbsp; :=<span style="color: #ff0000;">''</span><br />&nbsp; &nbsp;::<span style="color: #000000;">cUltimaop</span> :=<span style="color: #ff0000;">''</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">SELF</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">aRolloCalc</span>:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'C'</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nResult</span> &nbsp; :=<span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cUltima</span> &nbsp; :=<span style="color: #ff0000;">''</span><br />&nbsp; &nbsp;::<span style="color: #000000;">cUltimaop</span> :=<span style="color: #ff0000;">''</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> calculadora<span style="color: #000000;">&#40;</span>oPadre,cPatronSalida,lBorraAlInicio<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtnSalir<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtnmenos, oBtnmas, oBtnpor, oBtndividir, oBtnigual, oBtnBorra<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtn0, oBtn1, oBtn2, oBtn3, oBtn4, oBtn5, oBtn6, oBtn7, oBtn8, oBtn9, oBtnP, oBtnSigno<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtnConv, oBtnConv2<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtnDel<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSay<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrw, n:=<span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oGet, nGet:=<span style="color: #000000;">0</span> ,cGet:=<span style="color: #ff0000;">''</span>, nGetAnt:=<span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oFont1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oFontLst<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cPatronSalida=<span style="color: #00C800;">NIL</span> .and. ::<span style="color: #000000;">cPatronSalida</span>=<span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; cPatronSalida:=<span style="color: #ff0000;">'@E 9,999,999,999.99 '</span> &nbsp;<span style="color: #B900B9;">//Formato en que se pinta el resultado.</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//default cPatronSalida:='@E 9,999,999,999.99 ' &nbsp;//Formato en que se pinta el resultado.</span><br />&nbsp; &nbsp;<span style="color: #00C800;">default</span> lBorraAlInicio :=.f. &nbsp;<span style="color: #B900B9;">// Al llamar al método si está en .t. borra lo que hubiera.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp;Si está en .f. entonces conserva las operaciones anteriores.</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cPatronSalida</span>:=cPatronSalida<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 &nbsp; <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-20</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontLst <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">'Calculadora'</span> <span style="color: #0000ff;">OF</span> oPadre <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'CALCULADORA'</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnSalir <span style="color: #0000ff;">ID</span> <span style="color: #000000;">500</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'SALIR'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">default</span> CANCEL <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnSalir:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'S'</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnmenos <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Resta'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span>nGetAnt:=nGet,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'-'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>-nGetAnt,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span>,::<span style="color: #000000;">nResult</span>,nGetAnt<span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'-'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>-nGet<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'-'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnmenos:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'-'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnmas &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">402</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Suma'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span>nGetAnt:=nGet,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'+'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>+nGetAnt,aadd<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span>,::<span style="color: #000000;">nResult</span>,nGetAnt<span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'+'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>+nGet<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'+'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnmas:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'+'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnpor &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">403</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Multiplica'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, iif<span style="color: #000000;">&#40;</span>nGet=<span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">nResult</span><><span style="color: #000000;">0</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'x'</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'x'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult*nGet</span>,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'*'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnpor:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'*'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtndividir <span style="color: #0000ff;">ID</span> <span style="color: #000000;">404</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Divide'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, iif<span style="color: #000000;">&#40;</span>nGet=<span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">nResult</span><><span style="color: #000000;">0</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'/'</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'/'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>=<span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=nGet,iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=::<span style="color: #000000;">nResult</span>/nGet,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'/'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtndividir:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'/'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnigual &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">405</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Calcula resultado'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span>nGet=<span style="color: #000000;">0</span>,,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>nGet,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'+'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'-'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'*'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'/'</span>,<span style="color: #ff0000;">' '</span>,::<span style="color: #000000;">cUltimaOp</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nCalculadIgual</span><span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'='</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'='</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,::<span style="color: #000000;">cPatronSalida</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGetAnt:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnigual:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'='</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnBorra <span style="color: #0000ff;">ID</span> <span style="color: #000000;">425</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Borra todos los cálculos'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>iif<span style="color: #000000;">&#40;</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> aSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">'C'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'R'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'0'</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnBorra:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'R'</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnDel <span style="color: #0000ff;">ID</span> <span style="color: #000000;">426</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Borra último dígito'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'CE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span>cGet,len<span style="color: #000000;">&#40;</span>cget<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnDel:<span style="color: #000000;">cargo</span>:=chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnConv <span style="color: #0000ff;">ID</span> <span style="color: #000000;">407</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Convierte de euros a PTS'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>nGet*<span style="color: #000000;">166.386</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult*</span><span style="color: #000000;">166.386</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999 &nbsp; &nbsp; &nbsp;'</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'pts'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'AP'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; &nbsp;<span style="color: #B900B9;">// AP = a Pesetas</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999 pts'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnConv:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'E'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnConv2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">408</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Convierte de PTS a Euro'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>nGet/<span style="color: #000000;">166.386</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #0000ff;">round</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>/<span style="color: #000000;">166.386</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999.99 '</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">' €'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">'AE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; &nbsp;<span style="color: #B900B9;">// AE = a Euros</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>transform<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nResult</span>,<span style="color: #ff0000;">'@E 9,999,999,999.99 €'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=<span style="color: #ff0000;">''</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnConv:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'P'</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn0 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'0'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span> .or. <span style="color: #00C800;">at</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>,cGet<span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn0:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'0'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'1'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn1:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'1'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'2'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn2:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'2'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn3 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'3'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn3:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'3'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn4 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'4'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn4:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'4'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn5 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'5'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn5:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'5'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn6 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'6'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn6:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'6'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn7 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">107</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'7'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn7:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'7'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn8 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">108</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'8'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn8:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'8'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn9 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'9'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn9:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'9'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnP &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'.'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=cGet+::<span style="color: #000000;">cUltima</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> int<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span>==nGet <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnP:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">'.'</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnSigno <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'signo'</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGet:=<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*nGet &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cGet:=alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnSigno:<span style="color: #000000;">cargo</span>:=<span style="color: #ff0000;">' '</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oGet <span style="color: #0000ff;">VAR</span> nGet <span style="color: #0000ff;">ID</span> <span style="color: #000000;">211</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont1 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> nrgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, &nbsp;<span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">nResult</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont1 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrw FIELDS ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aRolloCalc</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aRolloCalc</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEAD <span style="color: #ff0000;">'valor'</span>,<span style="color: #ff0000;">' '</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">212</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFontLst <span style="color: #0000ff;">COLOR</span> &nbsp;nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span> ;<span style="color: #B900B9;">//clrLtrBrow,clrFonBrow ;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">aJustify</span> &nbsp;:=<span style="color: #000000;">&#123;</span>.t.,.f.<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">aColSizes</span> :=<span style="color: #000000;">&#123;</span>GetFontInfo<span style="color: #000000;">&#40;</span>oFontLst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> * <span style="color: #000000;">1.25</span> * <span style="color: #000000;">17</span>, GetFontInfo<span style="color: #000000;">&#40;</span>oFontLst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> * <span style="color: #000000;">1.25</span> * <span style="color: #000000;">3</span><span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//aMatrizTc({17,3},oFontLst)</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bGotop</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || n := <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bGoBottom</span> := <span style="color: #000000;">&#123;</span> || n := eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bLogicLen</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bSkip</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> | nwant, nold | nold := n , n += nwant,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n := <span style="color: #0000ff;">max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #0000ff;">min</span><span style="color: #000000;">&#40;</span> n, eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bLogicLen</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n - nOld <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">bLogicLen</span> := <span style="color: #000000;">&#123;</span> || len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">nClrPane</span>:=<span style="color: #000000;">&#123;</span>|| iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aRolloCalc</span><span style="color: #000000;">&#91;</span>n<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: #ff0000;">'='</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">200</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">125</span><span style="color: #000000;">&#41;</span>,nrgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><br />&nbsp; &nbsp; oDlg:<span style="color: #000000;">bKeyDown</span>:=<span style="color: #000000;">&#123;</span>|nKey| ::<span style="color: #000000;">TCalc_Teclas</span><span style="color: #000000;">&#40;</span>nKey,oDlg<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span><span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>lBorraAlInicio,oBtnBorra:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,.f.<span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oFont1:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oFontLst:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> ::<span style="color: #000000;">nResult</span><br /><br /><span style="color: #00C800;">METHOD</span> nCalculadigual<span style="color: #000000;">&#40;</span>nGet<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalc<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'-'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> - nGet<br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'+'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> + nGet<br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'*'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> * nGet<br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cUltimaOp</span> = <span style="color: #ff0000;">'/'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nResult</span> := ::<span style="color: #000000;">nResult</span> / nGet<br />&nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> TCalc_Teclas<span style="color: #000000;">&#40;</span>nKey, oDlg<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> TCalc<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> ny<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> ny:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>ny<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cargo</span>==upper<span style="color: #000000;">&#40;</span>chr<span style="color: #000000;">&#40;</span>nKey<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>ny<span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span> ny<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:1ibo3gi4] 
Calculator revisited
The code for those two buttons still generates a syntax error. I found some extra commas on those two buttons and removed them. Now it builds
Calculator revisited
I have it working now. I like the button sizing and the "tape" it displays. Here is a thought. When a user is in an active numeric get, if they pressed the F12 key, it would be nice for the calculator to popup with the current get value, then a calculation could be made on it, and the value returned to the current get field. Code suggestions for this behavior would be appreciated.
Calculator revisited
Friend, I I use a Math function as sin or cos with getcalc of Timm it make error do you have a solution for it ?
Calculator revisited
Tim, You could use: SetKey( VK_F12, { || MyCalculator( GetTextWindow( GetFocus() ) ) } )
Calculator revisited
Is GetTextWindow( ) an actual function ? The compiler doesn't think so. The calling procedure, in MAIN( ), for the suggested calculator is this: public oCalc:=tCalc():new() setkey(VK_F10, {|| oCalc:calculadora(oWnd,'@E 9,999,999.9999 ')}) What would be nice is for us to detect the current GET, if one is present and numeric, pass it's value to the calculator, and then return the result to the same Get field.
Calculator revisited
Tim, [quote="TimStone":1y7ezw5t]Is GetTextWindow( ) an actual function ? The compiler doesn't think so.[/quote:1y7ezw5t] [code=fw:1y7ezw5t]<div class="fw" id="{CB}" style="font-family: monospace;">GetWindowText<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1y7ezw5t] EMG
Calculator revisited
Timm, Can you please post the fixed code?. Thanks
Calculator revisited
I found the two buttons listed earlier in this thread had IIF( ) statements with 4 parameters instead of 3. In each case there was an extra comma ( , ). Remove those and it will build. The error only occurred with Harbour and not xHarbour, although it was a clear error. I don't want to post my revision because I changed prompts, coloring, etc. to match my program ( and use my established fonts and brush).
Calculator revisited
Tim, It was a typo in my code, please use the function name that Enrico says, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Calculator revisited
I do that a lot these days. My excuse is that I'm getting old ...
Calculator revisited
Nah, we should love our mistakes <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> We are humans <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Calculator revisited
Antonio, can we use math function on getcalc ? sample as sin() cos() tan() I tried compiling get calc with a function but when I insert the function it give me error
Calculator revisited
Silvio, As full source code is provided you can modify your calculator the way you may need it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Calculator revisited
Antonio, yes of course, But I not Know How I must make to run also extern functions... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Calculator revisited
Silvio, Those functions are part of harbour, as far as I know.
Calculator revisited
Fixed code [code=fw:xy0gthwu]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />&nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnDel <span style="color: #0000ff;">ID</span> <span style="color: #000000;">426</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Borra último dígito'</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'CE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,; <span style="color: #B900B9;">//IF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">//THEN</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; <span style="color: #B900B9;">//ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; <span style="color: #B900B9;">//IF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>cGet:=<span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span>cGet,len<span style="color: #000000;">&#40;</span>cget<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>,nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">//THEN</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,; <span style="color: #B900B9;">//ESLSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />...<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn0 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltima</span>:=<span style="color: #ff0000;">'0'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'='</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AP'</span> .or. ::<span style="color: #000000;">cUltimaOp</span>=<span style="color: #ff0000;">'AE'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cUltimaOp</span>:=<span style="color: #ff0000;">''</span>,::<span style="color: #000000;">nResult</span>:=<span style="color: #000000;">0</span>,aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRolloCalc</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">' '</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iif<span style="color: #000000;">&#40;</span>nGet<><span style="color: #000000;">0</span> .or. <span style="color: #00C800;">at</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>,cGet<span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> cGet:=cGet+::<span style="color: #000000;">cUltima</span>, nGet:=val<span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cGet<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtnIgual:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp;</div>[/code:xy0gthwu]
Calculator revisited
Antonio I mean ... with Getcalc of Tim ..
Calculo de SIZE xxxx de un GET
Estimados Se puede calcular el tamaño (de ancho) del parametro de SIZE xx,xx de un GET segun el tamaño de la variable de Caracteres o numerica (tiendo en cuenta el tamaño de Picture '9999 etc...) ? Muchas gracias david argentina
Calculo de SIZE xxxx de un GET
Hola amigo... Prueba lo siguiente: [code=fw:5zp6eoy5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span> Variable <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"Largo de la variable"</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:5zp6eoy5] Espero te sirva.
Calculo de distancias por GPS con funciones del MYSQL
Muy estimados amigos. Quiero compartir una rutina de calculo de distanacias con datos del GPS, pueda que le sirva alguien por ahi.. ami me trabaja de maravillas con mis sistemas. function CalculaDistancias() // esta vatiables son recogidas de la string GPRMC Latitud1 := ALLTRIM(STR(Op:GPGGA_cLat)) Longitud1 :="-"+ALLTRIM(STR(Op:GPGGA_cLong)) // dos datos de prueba Latitud2:="10.203574" Longitud2:="-83.782274" try oP:GpSDistancia := oCon:oKon:Query("SELECT (acos(sin(radians('"+Latitud1+"')) * sin(radians('"+Latitud2+"')) + cos(radians('"+Latitud1+"')) * cos(radians('"+Latitud2+"')) * cos(radians('"+Longitud1+"') - radians('"+Longitud2+"'))) * 6378) as distanciaPunto1Punto2") CATCH oError MsgStop( "No se ha podido calcular la distancia error en datos ") RETURN END oP:GpSDistancia :REFRESH() Op:GpSresultado := oP:GpSDistancia :FieldGet(1) Alert(Op:GpSresultado ) Return ********************************************************************************* [color=#FF0040:11dhs92m]Veamos la soluciónd e una manera más limpia: Radio de la Tierra: 6378 km. PUNTO 1 PUNTO 2 latitud LATITUD_1 LATITUD_2 longitud LONGITUD_1 LONGITUD_2 [/color:11dhs92m] SELECT (acos(sin(radians(LATITUD_1)) * sin(radians(LATITUD_2)) + cos(radians(LATITUD_1)) * cos(radians(LATITUD_2)) * cos(radians(LONGITUD_1) - radians(LONGITUD_2))) * 6378) as distanciaPunto1Punto2; *******************************************************************************
Calculo de distancias por GPS con funciones del MYSQL
Oscar, Cómo creas Op ?
Calculo de distancias por GPS con funciones del MYSQL
Perdon de me fue. Si Op: una clase que anda en el foro y se llama Public.prg con varios aportes incluyendo Aportes: [ER] Ray Islas. Simplemente es crear variables las cuales puedes controlar su contenido ya hacerlas publicas mas ordenado y contraldo. Trabaja muy bien ahora el que quiera un resultado en millas debe de cambiar Radio de la Tierra: 6378 km. por millas.. espero que les sirva.
Calculo de distancias por GPS con funciones del MYSQL
Está muy bien pero el que no trabaje con mysql tendría que enlazar alguna lib como Eagle1 o HDO para MySQL... no sería más fácil usar la lib hbct.lib de Harbour? Creo que el SELECT de MySQL se podría traducir por: [code=fw:3dvusxt6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> miDistancia<span style="color: #000000;">&#40;</span> lat1, lng1, lat2, lng2 <span style="color: #000000;">&#41;</span><br />resturn<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">acos</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">sin</span><span style="color: #000000;">&#40;</span> dtor<span style="color: #000000;">&#40;</span> lat1 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> * <span style="color: #0000ff;">sin</span><span style="color: #000000;">&#40;</span> dtor<span style="color: #000000;">&#40;</span> lat2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #0000ff;">cos</span><span style="color: #000000;">&#40;</span> dtor<span style="color: #000000;">&#40;</span> lat1 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> * <span style="color: #0000ff;">cos</span><span style="color: #000000;">&#40;</span> dtor<span style="color: #000000;">&#40;</span> lat2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> * <span style="color: #0000ff;">cos</span><span style="color: #000000;">&#40;</span> dtor<span style="color: #000000;">&#40;</span> lng1 <span style="color: #000000;">&#41;</span> - dtor<span style="color: #000000;">&#40;</span> lng2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">6371</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:3dvusxt6] Recordad que aqui at1, lng1, lat2, lng2 tienen que ser numericos y no pueden ir entrecomillados por lo que el ejemplo de Busmatic_wpb pasaria a ser: [code=fw:3dvusxt6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// esta vatiables son recogidas de la string GPRMC  <--- [color=#FF0000:3dvusxt6]Ya no debería ser string sino numeric[/color:3dvusxt6] </span><br />Latitud1 := Op:<span style="color: #000000;">GPGGA_cLat</span><br />Longitud1 := Op:<span style="color: #000000;">GPGGA_cLong</span><br /><br /><span style="color: #B900B9;">// dos datos de prueba</span><br />Latitud2 := <span style="color: #000000;">10</span>,<span style="color: #000000;">203574</span>   <span style="color: #B900B9;">// [color=#FF0000:3dvusxt6]Ojo con la , o . decimal[/color:3dvusxt6]</span><br />Longitud2 := <span style="color: #000000;">-83</span>,<span style="color: #000000;">782274</span><br /><br /><br />oP:<span style="color: #000000;">GpSDistancia</span> := miDistancia<span style="color: #000000;">&#40;</span> Latitud1, Longitud1, Latitud2, Longitud2 <span style="color: #000000;">&#41;</span><br /><br />oP:<span style="color: #000000;">GpSDistancia</span> :<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />Alert<span style="color: #000000;">&#40;</span> str<span style="color: #000000;">&#40;</span> Op:<span style="color: #000000;">GpSresultado</span> <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:3dvusxt6] <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
Calculo de distancias por GPS con funciones del MYSQL
If using MySql server version 5.7.1 or later, we can consider using MySql function [code=fw:20015j55]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ST_Distance_Sphere<span style="color: #000000;">&#40;</span> POINT<span style="color: #000000;">&#40;</span> lat1, long1 <span style="color: #000000;">&#41;</span>, POINT<span style="color: #000000;">&#40;</span> lat2, long3 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#91;</span>, radius<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:20015j55] which returns the distance in meters. If the 3rd parameter is ommitted, MySql uses Earth's radius by default. Instead of storing lattitude and longitude separately in Table, we can use SPATIAL datatype POINT. This is a sample that will be released with FWH 18.01; [code=fw:20015j55]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br />* mariageo.prg<br />* SPATIAL dataype POINT and Distance Calculations<br />*<br />* Requires MySql server 5.7.1 or above<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</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> oCn, oRs, cSql<br /><br />   oCn   := FW_DemoDB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Provide connection to your MySql 5.7.1 server</span><br /><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br />   CREATE TABLE citylatlong <span style="color: #000000;">&#40;</span><br />   <span style="color: #0000ff;">id</span> INT AUTO_INCREMENT PRIMARY KEY,<br />   city VARCHAR<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span>,<br />   <span style="color: #0000ff;">pt</span> POINT <span style="color: #000000;">&#41;</span><br />ENDTEXT<br /><br />   <span style="color: #00C800;">if</span> oCn:<span style="color: #000000;">TableExists</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"citylatlong"</span> <span style="color: #000000;">&#41;</span><br />      oCn:<span style="color: #000000;">DropTable</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"citylatlong"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br />   INSERT INTO citylatlong<br />   <span style="color: #000000;">&#40;</span> city, <span style="color: #0000ff;">pt</span> <span style="color: #000000;">&#41;</span> VALUES<br />   <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Hyd"</span>,    POINT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">78.4867</span>, <span style="color: #000000;">17.3850</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<br />   <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Mumbai"</span>, POINT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">72.8777</span>, <span style="color: #000000;">19.0760</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<br />   <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Delhi"</span>,  POINT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">77.1025</span>, <span style="color: #000000;">20.7041</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<br />   <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"London"</span>, POINT<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">0.1278</span>, <span style="color: #000000;">51.5074</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<br />   <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Paris"</span>,  POINT<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">2.3522</span>, <span style="color: #000000;">48.8566</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<br />   <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Madrid"</span>, POINT<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">3.7038</span>, <span style="color: #000000;">40.4168</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />ENDTEXT<br /><br />   oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br />   ocn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DROP FUNCTION IF EXISTS distance_between"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br />   CREATE <span style="color: #00C800;">FUNCTION</span> distance_between<span style="color: #000000;">&#40;</span> city1 VARCHAR<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span>, city2 VARCHAR<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   RETURNS DOUBLE<br />   BEGIN<br />   DECLARE p1 POINT;<br />   DECLARE p2 POINT;<br /><br />   <span style="color: #0000ff;">SELECT</span> <span style="color: #0000ff;">pt</span> INTO p1 <span style="color: #0000ff;">FROM</span> citylatlong <span style="color: #0000ff;">WHERE</span> city = city1;<br />   <span style="color: #0000ff;">SELECT</span> <span style="color: #0000ff;">pt</span> INTO p2 <span style="color: #0000ff;">FROM</span> citylatlong <span style="color: #0000ff;">WHERE</span> city = city2;<br /><br />   <span style="color: #00C800;">RETURN</span> ST_Distance_Sphere<span style="color: #000000;">&#40;</span> p1, p2 <span style="color: #000000;">&#41;</span>;<br />   END;<br />ENDTEXT<br />   oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br />   oRs   := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT id, city, X( pt ) AS Longitude, Y( pt ) AS Lattitude from citylatlong"</span> <span style="color: #000000;">&#41;</span><br />   XBROWSER oRs SETUP <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"9999.999999"</span>, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"999.999999"</span> <span style="color: #000000;">&#41;</span><br />   oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   ? oCn:<span style="color: #000000;">distance_between</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"London"</span>, <span style="color: #ff0000;">"Paris"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// --> 334575.4 meters</span><br /><br />   oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:20015j55] [url=https&#58;//imageshack&#46;com/i/pnSBtkLqp:20015j55][img:20015j55]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/923/SBtkLq&#46;png[/img:20015j55][/url:20015j55] This also creates a stored function on the Server called "distance_between( city1, city2 )" and using FWMARIADB library we can call the function by [code=fw:20015j55]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   ? oCn:<span style="color: #000000;">distance_between</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Paris"</span>, <span style="color: #ff0000;">"Madrid"</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:20015j55] as if it is built-in method.
Calculo de distancias por GPS con funciones del MYSQL
[quote:17nxxgjd]SELECT (acos (sin (radians (LATITUD_1)) * sin (radians (LATITUD_2)) + cos (radians (LATITUD_1)) * cos (radians (LATITUD_2)) * cos (radians ( LONGITUD_1) - radians (LONGITUDE_2))) * 6378) as distancePoint1Point2; [/quote:17nxxgjd] Should Earth's radius be taken as 6371 instead of 6378 ?
Calculo de distancias por GPS con funciones del MYSQL
Compañeros Gracias por compartir con nosotros su conocimiento, gracias My friends Thank you very much indeed as we learn from others, thank you very much for sharing. Xmanuel gracias por compartir dime esta funcion es para Xharbour ?? o solo para Harbour. , hbct.lib
Calculo de distancias por GPS con funciones del MYSQL
Perdona el retraso... Está en los dos: Harbour -> hbct.lib xHarbour -> ct.lib
Calculo de division...(Resuelto) Gracias
Hola Buenas tardes a todos los amigos de fivewin, de la manera mas atenta les solicito su ayuda, que me ayuden a como hacer la division de IVA del importe total dado, tengo en la base de datos TASAIVA 16.00 y quiero que de mi importe acumulado del precio total, por ejemplo: (545*16)/100 me da = 87.20 y no es el dato que me esta dando a dividir el porcentaje ... 545/16 = 469.83 O sea en la calculadora 545/1.16 = 469.83, pero... como hacerlo de la manera mas logica la base de IVA 545/16, ya que la defino como 16 por ciento de IVA en la base de datos. Espero haberme explicado y mucho les agradecere su ayuda y sus experiencias. Saludos Atte: Adriano C. C. <!-- e --><a href="mailto:acc69@hotmail.com">acc69@hotmail.com</a><!-- e -->
Calculo de division...(Resuelto) Gracias
si entendi tu pregunta [code=fw:2k109kr2]<div class="fw" id="{CB}" style="font-family: monospace;">porIva := VAL<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"1."</span> + ltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>field->iva<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// 1.16 numeric</span><br /> </div>[/code:2k109kr2]
Calculo de division...(Resuelto) Gracias
[quote="Patricio Avalos Aguirre":x4rhd7l2]si entendi tu pregunta [code=fw:x4rhd7l2]<div class="fw" id="{CB}" style="font-family: monospace;">porIva := VAL<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"1."</span> + ltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>field->iva<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// 1.16 numeric</span><br /> </div>[/code:x4rhd7l2][/quote:x4rhd7l2] Gracias Patricio, al igual gracias a William, por compartir sus conocimientos y experiencias, les mando saludos cordiales. Pero problema resuelto, saludos nPorcentajeIVA := 16 nTotal := 545 nSIVA := ntotal / (1 + (nPorcentaje/100)) nIva := nTotal - nSIVA ? nIva Atte: Adrian C. C.
Calculo de division...(Resuelto) Gracias
Adrian: Vamos por partes Si partes de una base de 545.00, para obtener el importe del IVA haces (545 * 16)/ 100 = 87.20 Entonces 545.00 + 87.20 = 632.20 como importe total Ahora en reversa, para obtener el importe del IVA tomando como base el importe total, primero debes obtener la base (antes de iva) 632.20/(1 + (16/100)) = 545.00 Ahora por diferencia obtienes el importe del IVA 632.20 - 545.00 = 87.20 Espero que esto sea lo que buscas
Calculo de division...(Resuelto) Gracias
[quote="Armando":2ybfwple]Adrian: Vamos por partes Si partes de una base de 545.00, para obtener el importe del IVA haces (545 * 16)/ 100 = 87.20 Entonces 545.00 + 87.20 = 632.20 como importe total Ahora en reversa, para obtener el importe del IVA tomando como base el importe total, primero debes obtener la base (antes de iva) 632.20/(1 + (16/100)) = 545.00 Ahora por diferencia obtienes el importe del IVA 632.20 - 545.00 = 87.20 Espero que esto sea lo que buscas[/quote:2ybfwple] Gracias Armando, pero no era asi como yo lo queria, el importe es el total 545.00 ya con importe Total de IVA incluido, lo que queria era...como ahora dividir para que me de resultado de 469.83, pero gracias Armando, problema resuelto era tan simple que era agregarle un (1+(porcentaje)/100 Gracias se te agradece Armando, cualquier duda respecto a contabilidad, estoy a sus ordenes, tengo realizado un sistema parecido a contabilidad de 1 a 4 niveles de cuentas , con sus segmentos de negocios, y hasta balanza de comprobacion por cada proveedor o segmento de negocio,llamale empresa ,compañia o departamento, cualquiera que me soliciten rutina, haganmelo saber y con gusto les comparto mis experiencias. Gracias y saludos a todos...
Calculo de nLogPixY en TReport
Hola amigos del foro: Nuevamente con problemas en los reportes, utilizando la clase TReport El problema surge cuando cambio de impresora, y creo que es por el calculo del valor de [b:3usy0j6h]nLogPixY[/b:3usy0j6h] Tengo un reporte (FACTURA) y segun la impresora imprime: [list:3usy0j6h][b:3usy0j6h]PDFCreator:[/b:3usy0j6h] 10 lineas [b:3usy0j6h]EN UNA SOLA HOJA!!!![/b:3usy0j6h] [b:3usy0j6h]Canon IP1700:[/b:3usy0j6h] 8 lineas (impresora Chorro de tinta) [b:3usy0j6h]Canon LPB300:[/b:3usy0j6h] 7 lineas (impresora Laser) [b:3usy0j6h]Epson LX300+:[/b:3usy0j6h] 8 lineas (impresora matricial)[/list:u:3usy0j6h] La relacion del valor de [b:3usy0j6h]nLogPixY[/b:3usy0j6h] por impresora (obtenido con oRpt:oDevice:nLogPixelY()) es: [list:3usy0j6h][b:3usy0j6h]PDFCreator:[/b:3usy0j6h] 600 (estandar definido por windows) [b:3usy0j6h]Canon IP1700:[/b:3usy0j6h] 600 (estandar definido por windows) [b:3usy0j6h]Canon LPB300:[/b:3usy0j6h] 600 (estandar definido por windows) [b:3usy0j6h]Epson LX300+:[/b:3usy0j6h] 180[/list:u:3usy0j6h] Estos valores no estan correctos, ya que si establesco un margen superior de 2 Pulgadas, esto me da 1200Pix en cualquier impresora, lo cual no es correcto!!! La relacion de [b:3usy0j6h]RESOLUCION[/b:3usy0j6h] por impresora (obtenido con oRpt:oDevice:nVertRes()) es: [list:3usy0j6h][b:3usy0j6h]PDFCreator:[/b:3usy0j6h] 6600 [b:3usy0j6h]Canon IP1700:[/b:3usy0j6h] 6411 [b:3usy0j6h]Canon LPB300:[/b:3usy0j6h] 6360 [b:3usy0j6h]Epson LX300+:[/b:3usy0j6h] 1920[/list:u:3usy0j6h] Si mi hoja de papel es de 11 pulgadas de alto, al dividir la RESOLUCION entre las pulgadas me da los siguientes resultados: [list:3usy0j6h][b:3usy0j6h]PDFCreator:[/b:3usy0j6h] 600 [b:3usy0j6h]Canon IP1700:[/b:3usy0j6h] 582 [b:3usy0j6h]Canon LPB300:[/b:3usy0j6h] 578 [b:3usy0j6h]Epson LX300+[/b:3usy0j6h] 174[/list:u:3usy0j6h] Estos valores deberia ser establecidos en [b:3usy0j6h]oRpt:nLogPixY[/b:3usy0j6h] porque [b:3usy0j6h]son los correctos!!!![/b:3usy0j6h] PROBANDO: para cambiar el valor de oRpt:nLogPixY hago: [code=fw:3usy0j6h]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oRpt:<span style="color: #000000;">bInit</span> := <span style="color: #000000;">&#123;</span>|oRpt| oRpt:<span style="color: #000000;">nLogPixY</span> := oRpt:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">11</span>,; <span style="color: #B900B9;">//recalculo nLogPixY</span><br />                      oRpt:<span style="color: #000000;">Margin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, RPT_TOP, RPT_INCHES <span style="color: #000000;">&#41;</span>,;       <span style="color: #B900B9;">//recalculo margen superior</span><br />                      oRpt:<span style="color: #000000;">Margin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, RPT_BOTTOM, RPT_INCHES <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>    <span style="color: #B900B9;">//recalculo margen inferior</span><br /> </div>[/code:3usy0j6h] Y asi logro imprimir las 10 lineas [b:3usy0j6h]EN UNA SOLA HOJA!!!![/b:3usy0j6h], ..en las cuatro impresoras. En base a esto, sera posible cambiar la clase TReport() ???? - Claro que sera algo dificil porque el tamaño de papel es variable (en este ejemplo es de 11 pulgadas) - El tamaño se lo podria obtener con ::oDevice:SetSize() o ::oDevice:SetPage() o con loa funcion PrnGetSize( ::hDC ) ya que no se lo especifica en ninguna parte de TReport() [b:3usy0j6h]Notese tambien[/b:3usy0j6h], que en este ejemplo solo se corrigio los margenes inferior y superior y cualquie otro valor que se calcule en oRpt:Stabilize (), pero no asi los Fonts y Pen que se recalculan en el metodo oRpt:New() Bueno, espero tener respuesta de alguien (ya que anteriormente puse 3 o mas post y ninguno me fue respondido) Atentamente, Rolando Cochabamba, Bolivia
Calculo de nLogPixY en TReport
Algo parecido me pasa a mi con una impresora concreta : una brother hl-5350Dn . El problema esta aquí ( en mi caso , codigo en rprinter.prg ) [code=fw:24xn52e3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />         <span style="color: #B900B9;">//  nAspect        := ::oDevice:nHorzSize() / ::oDevice:nVertSize()</span><br /> </div>[/code:24xn52e3] No sé si es un bug pero a mi no me detecta bien los valores ::odevice:nVertSize() , ::oDevice:nHorzSize() por lo que naspect no es correcto . Mi solucion fué esta : [code=fw:24xn52e3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />     aSizes:=::<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">GetPhySize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      nAspect:= aSizes<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>/aSizes<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />    <span style="color: #B900B9;">//  nAspect        := ::oDevice:nHorzSize() / ::oDevice:nVertSize()</span><br /><br /> </div>[/code:24xn52e3] Hago depender la proporción de los valores de tamaño de página y eso siempre sera universal . De esa misma forma en tu caso deberias coger los valores de tamaño de página a usar y a partir de ellos calcular el resto ... Saludos.
Calculo de nLogPixY en TReport
Al parecer no entendieron el problema: El valor 600 es un estandar que windows define (de alguna forma, para cada tipo de impresora). Por lo tanto si yo quiero establecer el margen superior en 2 pulgadas lo que se hace en oRpt:Margin() es: [code=fw:3bxhqx36]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">nTopMargin</span> &nbsp; := Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLogPixY</span> * nValue <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3bxhqx36] Es decir Int( 600 * 2 ) = 1200 y este valor es para cualquier impresora, sin importar su RESOLUCION, lo que hace que falle el reporte. Esperaba que Antonio dijera algo, pero ni modo a este paso creo que no avanzaremos en cuanto a los reportes. Saludos.
Calculo del RFC México
Saludos Colegas, echandole un vistazo a las antiguas news encontré que ya alguien había solicitado lo mismo. La rutina para calcular el RFC ¿Está posteada en algún lugar? Gracias Fernando Leal México, DF
Calculo del RFC México
Fernando, esta usamos nosotros espero te sirva Saludos Joel Andujo [code:3nkg4cx1] *----------------------------* Func RFC_Val&#40;xvar&#41; rfccad&#58;=upper&#40;xvar&#41; xvar &#58;=rfccad rfccad&#58;=strtran&#40;rfccad,'-',''&#41; if empty&#40;left&#40;rfccad,4&#41;&#41; tone&#40;300,2&#41; if msgyesno&#40;'R&#46;F&#46;C&#46; No Válido, ¿ Continuar ?','Seleccione Opción&#46;&#46;&#46;'&#41; retu&#46;t&#46; endi retu&#46;f&#46; endi if ctod&#40;subs&#40;rfccad,9,2&#41;+'/'+subs&#40;rfccad,7,2&#41;+'/'+subs&#40;rfccad,5,2&#41;&#41;=ctod&#40;' / / '&#41; tone&#40;300,2&#41; msgalert&#40;'Fecha del R&#46;F&#46;C&#46; no es válida','Aviso&#46;&#46;&#46;'&#41; retu&#46;f&#46; endi if Digit_Ver&#40;rfccad&#41;<>right&#40;rfccad,1&#41; tone&#40;300,2&#41; if msgyesno&#40;'R&#46;F&#46;C&#46; No Válido, ¿ Continuar ?','Seleccione Opción&#46;&#46;&#46;'&#41; retu&#46;t&#46; endi retu&#46;f&#46; endi retu&#46;t&#46; *-------------* stat proc Digit_Ver&#40;&#41; para gx_rfc local digv&#58;='',gx_asc&#58;=0,gx_car&#58;=0,gx_sum&#58;=0,gx_pos&#58;=0 for yy&#58;= 1 to 12 gx_car&#58;=0; gx_pos&#58;=14 - yy gx_asc &#58;= Asc&#40;SubStr&#40;gx_rfc,yy,1&#41;&#41; if &#40;gx_asc>47&#41;&#46;and&#46;&#40;gx_asc<58&#41; gx_car&#58;=&#40;gx_asc-48&#41; endi if &#40;gx_asc>64&#41;&#46;and&#46;&#40;gx_asc<79&#41; gx_car&#58;=&#40;gx_asc-55&#41; endi if &#40;gx_asc>78&#41;&#46;and&#46;&#40;gx_asc<91&#41; gx_car&#58;=&#40;gx_asc-54&#41; endi if &#40;gx_asc=38&#41; gx_car&#58;=24 endi if gx_asc=32 gx_car&#58;=37 endi gx_sum&#58;=&#40;gx_sum+gx_car*gx_pos&#41; next yy gx_asc&#58;=gx_sum - Int&#40;gx_sum/11&#41; * 11 if &#40;gx_asc<>0&#41;&#46;and&#46;&#40;gx_asc<>1&#41; digv&#58;=AllTrim&#40;str&#40;11 - gx_asc&#41;&#41; else if gx_asc=0 digv&#58;='0' endi if gx_asc=1 digv&#58;='A' endi endi retu&#40;digv&#41;[/code:3nkg4cx1]
Calculo del RFC México
Yo tengo algo parecido que solo valida las letras y la fecha... ya conseguí las reglas donde dice algunas cosas como Si tiene solo un apellido usar... Si la cadena resultante es ofensiva como CACA cambiar la ultima letra por una X. etc, etc. Saludos
Calculo del digito de control de cuenta bancaria
Ruego por favor si alguien sabe el algoritmo utilizado para el calculo del digito de control de un numero de cuenta bancaria. Gracias
Calculo del digito de control de cuenta bancaria
Julio, Aquí está el código en php. Es fácil pasarlo a Clipper: <!-- m --><a class="postlink" href="http://bulma.net/body.phtml?nIdNoticia=1396">http://bulma.net/body.phtml?nIdNoticia=1396</a><!-- m -->
Calculo del digito de control de cuenta bancaria
Aquí la tienes para clipper: cBanco:=SPACE(4) cSucursal:=SPACE(4) cRefer2:=SPACE(10) @ 24,0 SAY SPACE(80) @ 24,4 SAY "Introduzca Banco, Sucursal y N£m. de cuenta......" DibujaCuadro(11,8,15,70, "W+/B",.T.) @ 11,10 SAY " CALCULO DE DIGITOS DE CUENTA BANCARIA " COLOR "W+/R" SetCursor(3) @ 13,15 SAY " Banco Sucursal DC Cuenta" COLOR "W+/B" @ 14,15 SAY " [ ] [ ] [ ] [ ]" COLOR "G/B" @ 14,18 GET cBanco PICTURE "9999" COLOR "GR+/B" @ 14,28 GET cSucursal PICTURE "9999" COLOR "GR+/B" @ 14,45 GET cRefer2 PICTURE "9999999999" COLOR "GR+/B" READ cRefer1=cBanco+cSucursal @ 14,38 SAY digBanco(cRefer1,cRefer2) COLOR "W+/R" ************************************************************************* FUNCTION Digbanco(cRefer1,cRefer2) ************************************************************************* LOCAL nDigitos := 10 LOCAL aDigito := ARRAY( nDigitos ) LOCAL aPeso := { 1, 2, 4, 8, 5, 10, 9, 7, 3, 6 } LOCAL nSuma := 0 LOCAL nCont LOCAL nModulo LOCAL nResto LOCAL cDigito1 LOCAL cDigito2 cRefer1 := STRTRAN(cRefer1,'-') cRefer1 := STRTRAN(cRefer1,'.') cRefer1 := STRTRAN(cRefer1,'/') cRefer1 := STRTRAN(cRefer1,' ') cRefer1 := RIGHT(cRefer1,nDigitos) cRefer1 := PADL(cRefer1,nDigitos,'0') cRefer2 := STRTRAN(cRefer2,'-') cRefer2 := STRTRAN(cRefer2,'.') cRefer2 := STRTRAN(cRefer2,'/') cRefer2 := STRTRAN(cRefer2,' ') cRefer2 := RIGHT(cRefer2,nDigitos) cRefer2 := PADL(cRefer2,nDigitos,'0') FOR nCont := 1 to nDigitos aDigito[ nCont ] := VAL( SUBSTR( cRefer1, nCont, 1 ) ) nSuma += ( aDigito[ nCont ] * aPeso[ nCont ] ) NEXT nModulo := 11 - INT( nSuma % 11 ) nResto := IF( nModulo == 10, 1, IF( nModulo == 11, 0, nModulo ) ) cDigito1 := LTRIM(STR(nResto)) nSuma := 0 FOR nCont := 1 to nDigitos aDigito[ nCont ] := VAL( SUBSTR( cRefer2, nCont, 1 ) ) nSuma += ( aDigito[ nCont ] * aPeso[ nCont ] ) NEXT nModulo := 11 - INT( nSuma % 11 ) nResto := IF( nModulo == 10, 1, IF( nModulo == 11, 0, nModulo ) ) cDigito2 := LTRIM(STR(nResto)) RETURN(cDigito1+cDigito2)
Calculo del digito de control de cuenta bancaria
Function cDcontrol( cEntidad, cOficina, cCuenta ) Local nSuma, nPos, nResto, cDc Local anPeso := {1,2,4,8,5,10,9,7,3,6} if empty(cCuenta) return cCuenta Endif // Primer digito de control nSuma := 0 FOR nPos := 1 TO 8 nSuma += Val( SubStr( cEntidad + cOficina, nPos, 1 ) ) * anPeso[nPos + 2] NEXT nBuc nResto := 11 - (nSuma % 11) cDc := If( nResto = 10, '1', If( nResto = 11, '0', Str( nResto, 1 ) ) ) // Segundo digito de control nSuma := 0 FOR nPos := 1 TO 10 nSuma += Val( SubStr( cCuenta, nPos, 1 ) ) * anPeso[nPos] NEXT nPos nResto := 11 - (nSuma % 11) cDc += If( nResto = 10, '1', If( nResto = 11, '0', Str( nResto, 1 ) ) ) RETURN cDc /*
Calculo del digito de control de cuenta bancaria
Muchas gracias a todos, no solo el algoritmo, ya esta la función hecha. Lo dicho muy agradecido. Un saludo.
Calendar
Hola,Sabria deirme alguien si existe una clase o funcion en FWH para menejar el calendario.Saludos,
Calendar
[quote="alfonso":2pfz9s8a]Hola, Sabria deirme alguien si existe una clase o funcion en FWH para menejar el calendario. Saludos,[/quote:2pfz9s8a][code:2pfz9s8a] #Include "Fivewin&#46;ch" #Include "Dtpicker&#46;ch" FUNCTION MAIN&#40;&#41; SET DATE TO FRENCH SET CENTURY On SET EPOCH TO 1961 Recursos&#40;&#41; Codigo&#40;&#41; RETURN NIL FUNCTION Recursos&#40;&#41; LOCAL oDlg, oGet, lChg&#58;=&#46;F&#46; LOCAL aRec, dDate&#58;=Date&#40;&#41; DEFINE DIALOG oDlg RESOURCE "SET_DATE" TITLE "DTPicker desde Recursos" REDEFINE DTPICKER oGet VAR dDate ID 10 OF oDlg ON CHANGE oGet&#58;Refresh&#40;&#41; REDEFINE BUTTON ID 20 OF oDlg ACTION &#40;lChg&#58;=&#46;T&#46;,oDlg&#58;End&#40;&#41;&#41; REDEFINE BUTTON ID 30 OF oDlg ACTION &#40;lChg&#58;=&#46;F&#46;,oDlg&#58;End&#40;&#41;&#41; CANCEL ACTIVATE DIALOG oDlg IF lChg //SetDate&#40;Day&#40;dDate&#41;,Month&#40;dDate&#41;,Year&#40;dDate&#41;&#41; MsgAlert&#40;dDate&#41; ENDIF RETURN NIL FUNCTION Codigo&#40;&#41; local oWnd, oSay local dDate &#58;= Date&#40;&#41; SET DATE TO FRENCH SET CENTURY ON SET EPOCH TO 1960 DEFINE WINDOW oWnd TITLE "DTPicker desde Código &#46;&#46;&#46;&#46;" @ 3, 30 SAY oSay PROMPT "Fecha&#58; "+ Dtoc&#40; dDate &#41; OF oWnd SIZE 200, 20 @ 2, 2 DTPICKER dDate OF oWnd ON CHANGE oSay&#58;Refresh&#40;&#41; ACTIVATE WINDOW oWnd return NIL ------------------------- El archivo &#46;rc&#58; --------------- 1 24 "wxp&#46;man" SET_DATE DIALOG 18, 37, 201, 108 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Datos&#58;" FONT 8, "MS Sans Serif" &#123; PUSHBUTTON "&Aceptar", 20, 42, 69, 48, 13 PUSHBUTTON "&Cancelar", 30, 112, 69, 46, 13 CONTROL "", 10, "SysDateTimePick32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 27, 81, 14 [/code:2pfz9s8a]Espero esto sea lo que buscas.
Calendar / Appointment
I don't suppose anyone has written a Calendar / Appointment book using pure FW/xHB code, but perhaps someone has found a control set they can link in successfully. I would like to update an old scheduler program ( 32 bit modification of an original Grumpfish program ) to the newer look and feel of true Windows scheduling. There are Active X programs available, but I want to retain DBF capabilities for my data, and the ability to share the data file across several users. Has anyone found suitable products for this purpose ? Your thoughts would be appreciated. I have looked at the CodeJock Active X component. First, a previous email thread on this object never showed that it would finally work. Secondly, I wrote to them about using it with a .DBF format and they indicated it was possible, but not designed to do that. Has anyone tried using this product with a .dbf format ( CodeJock Calendar Object ) ? Thanks Tim <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Calendar / Appointment
Tim, I remember that Paco García, from Canalfive, has a calendar with appointments, and a beta of a scheduler. Ask him for this products. Regards, José Luis
Calendar / Appointment
They have a date picker, but no full calendar with appointment scheduling, etc. The key is the display of the appointment book.