Page 3 of 3

Re: Calculator revisited

PostPosted: Tue Jun 03, 2014 6:26 am
by Silvio.Falconi
Antonio, yes of course, But I not Know How I must make to run also extern functions... :)

Re: Calculator revisited

PostPosted: Tue Jun 03, 2014 6:48 am
by Antonio Linares
Silvio,

Those functions are part of harbour, as far as I know.

Re: Calculator revisited

PostPosted: Tue Jun 03, 2014 8:08 am
by Biel EA6DD
Fixed code
Code: Select all  Expand view

...
 REDEFINE BUTTON oBtnDel ID 426 OF oDlg MESSAGE 'Borra Ășltimo dĂ­gito';
             ACTION (::cUltima:='CE'            ,;
                     iif(::cUltimaOp='=' .or. ::cUltimaOp='AP' .or. ::cUltimaOp='AE'                                    ,; //IF
                           (::cUltimaOp:='',::nResult:=0,aadd( ::aRolloCalc, {' ',' '} ),oBrw:gobottom(),oBrw:refresh()),; //THEN
                            NIL )                                                                                       ,; //ELSE
                     iif(nGet<>0                                         ,; //IF
                           (cGet:=LEFT(cGet,len(cget)-1),nGet:=val(cGet)),; //THEN
                            NIL)                                         ,; //ESLSE
                     oGet:SetText(cGet)         ,;
                     oBtnIgual:Setfocus()       ,;
                     sysrefresh() ) UPDATE
...

    REDEFINE BUTTON oBtn0   ID 100 OF oDlg ;
             ACTION (::cUltima:='0'                                                                                      ,;
                     iif(::cUltimaOp='=' .or. ::cUltimaOp='AP' .or. ::cUltimaOp='AE'                                     ,;
                           (::cUltimaOp:='',::nResult:=0,aadd( ::aRolloCalc, {' ',' '} ), oBrw:gobottom(),oBrw:refresh()),;
                           NIL )                                                                                         ,;
                     iif(nGet<>0 .or. at(".",cGet)>0               ,;
                           ( cGet:=cGet+::cUltima, nGet:=val(cGet)),;
                           NIL )                                   ,;
                     oGet:SetText(cGet)         ,;
                     oBtnIgual:Setfocus()       ,;
                     sysrefresh() ) UPDATE

 

Re: Calculator revisited

PostPosted: Wed Jun 04, 2014 2:52 pm
by Silvio.Falconi
Antonio I mean ... with Getcalc of Tim ..