FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error en funci贸n Floor(0)
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Error en funci贸n Floor(0)
Posted: Thu Feb 09, 2017 03:01 PM
Hola amigos, obteniendo unos informes, en ciertas ocasiones se me genera un error mientras se est谩n preparando los mismos.

Code (fw): Select all Collapse
Called from FLOOR(0)
Called from N2E(164) in .\source\function\VALTOSTR.PRG
Called from CVALTOSTR(150) in .\source\function\VALTOSTR.PRG
Called from TRGROUP:TOTAL(96) in .\source\classes\RGROUP.PRG
Called from TRGROUP:FOOTER(189) in .\source\classes\RGROUP.PRG
Called from TREPORT:ENDGROUP(1774) in ..\clases\report.prg
Called from TREPORT:PLAY(1124) in ..\clases\report.prg
Called from (b)TREPORT_ACTIVATE(923) in ..\clases\report.prg


Concretamente en la llamada
Code (fw): Select all Collapse
e := Floor( nLog )


de la funci贸n N2E
Code (fw): Select all Collapse
static function N2E( nNum, nDec )

聽 聽local e := 0, nLog, cRet

聽 聽DEFAULT nDec := 2

聽 聽nLog 聽:= Log10( nNum )
聽 聽e 聽 聽 := Floor( nLog )
聽 聽nNum 聽:= 10 ^ ( nLog - e )
聽 聽if e > 9 .and. nDec > 0
聽 聽 聽 nDec--
聽 聽endif
聽 聽cRet 聽:= Str( nNum, nDec + 2, nDec ) + "E" + LTrim( Str( e ) )

return cRet


驴Alguna idea?
Gracias
Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4

Continue the discussion