Round function with problem - HELP
Posted: Mon Jul 07, 2014 6:00 pm
Hello friends
I have problems when I use the round function a few times, this is the error returned by FiveWin (note: put in errsysw.prg to show what's in errolog)
Errolog :
and this here is the source code (PRG) error cited:
I have problems when I use the round function a few times, this is the error returned by FiveWin (note: put in errsysw.prg to show what's in errolog)
Errolog :
Code: Select all
Aplicacao
==========
Nome e Caminho: S:\Integrad\Mstar.exe
Tamanho: 25,164,800 bytes
Unidade Mapeada: \\SERVIDOR\Lojao
Windows version: Windows 7 6.1.7601 Service Pack 1 6.1, Build 7601 Service Pack 1
Tempo Desde a Abertura do Programa: 0 hours 20 mins 30 secs
Maximo de arquivos abertos: ( SetHandleCount() ) 0
Ocorreu erro em: 07/07/2014, 14:25:58
Versão Mobile:07.2014.08
Descricao: Erro BASE/1094 Erro nos parƒmetros: ROUND
Args:
[ 1] = A { ... } {NIL, -65211}
[ 2] = N 3
Chamadas ao Stack
=================
=> ROUND( 0 )
PEDIDO2.PRG => CALCULA_TOTAL_GERAL( 10777 )
PEDIDO2.PRG => CALCULA_TUDO( 10245 )
PEDIDO2.PRG => ITENS_PEDIDO( 6861 )
PEDIDO2.PRG => (b)PEDIDO( 1776 )
BUTTON.PRG => TBUTTONBMP:CLICK( 163 )
CONTROL.PRG => TBUTTON:HANDLEEVENT( 1687 )
BUTTONB.PRG => TBUTTONBMP:HANDLEEVENT( 214 )
WINDOW.PRG => _FWH( 3236 )
=> SENDMESSAGE( 0 )
DIALOG.PRG => TDIALOG:COMMAND( 389 )
=> TWINDOW:HANDLEEVENT( 0 )
DIALOG.PRG => TDIALOG:HANDLEEVENT( 892 )
WINDOW.PRG => _FWH( 3236 )
=> DIALOGBOX( 0 )
DIALOG.PRG => TDIALOG:ACTIVATE( 274 )
PEDIDO2.PRG => PEDIDO( 2086 )
MSTAR.PRG => (b)MENUPEDIDO( 577 )
MENU.PRG => TMENU:ACTIVATE( 496 )
MSTAR.PRG => MENUPEDIDO( 592 )
MSTAR.PRG => (b)BUTTONBAT_BUILD( 447 )
BTNBMP.PRG => TBTNBMP:CLICK( 476 )
BTNBMP.PRG => TBTNBMP:LBUTTONUP( 667 )
CONTROL.PRG => TCONTROL:HANDLEEVENT( 1723 )
BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1470 )
WINDOW.PRG => _FWH( 3236 )
=> WINRUN( 0 )
WINDOW.PRG => TWINDOW:ACTIVATE( 1003 )
MSTAR.PRG => MAIN( 330 )
Sistema
=======
CPU : Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz
Memoria: 4185764608 (4087660 megas)
Recursos do sistema: % 90
GDI : % 90
Utilizador : % 90
Versao de Windows e MSDOS: 6. 1, **. 2
Aplicacoes em Execucao : 6
1 ,
2 , C:\Windows\syswow64\SHLWAPI.dll
3 , S:\Integrad\DLL\CobreBemX.dll
4 , S:\Integrad\DLL\FrSysth.dll
5 , S:\Integrad\Mstar.exe
6 MCI command handling window, C:\Windows\system32\WINMM.DLL
Variaveis em uso
================
Funcao Tipo Valor
==========================
ROUND
Param 1: O Classe: ERROR
CALCULA_TOTAL_GERAL
Param 1: A Tam: 2
Param 2: N 3
Local 1: U
Local 2: U
CALCULA_TUDO
Param 1: L .T.
ITENS_PEDIDO
Param 1: C "311488"
Param 2: L .T.
(b)PEDIDO
Param 1: C "P"
Param 2: L .T.
Param 3: O Classe: TXBROWSE
Param 4: O Classe: TDIALOG
Param 5: O Classe: TBUTTONBMP
Param 6: O Classe: TGET
Param 7: O Classe: TGET
Local 1: N 3
Local 2: N 30
Local 3: S
TBUTTONBMP:CLICK
Param 1: O Classe: TBUTTONBMP
TBUTTON:HANDLEEVENT
TBUTTONBMP:HANDLEEVENT
Param 1: N 2048
Param 2: N 0
Param 3: N 0
Local 1: U
_FWH
Param 1: N 2048
Param 2: N 0
Param 3: N 0
Local 1: U
SENDMESSAGE
Param 1: N 0
Param 2: N 2048
Param 3: N 0
Param 4: N 0
Param 5: N 56
Local 1: O Classe: TBUTTONBMP
TDIALOG:COMMAND
Param 1: N 2752888
Param 2: N 2048
Param 3: N 0
Param 4: N 0
TWINDOW:HANDLEEVENT
Param 1: N 40
Param 2: N 2752888
Local 1: O Classe: TBUTTONBMP
Local 2: N 0
Local 3: N 40
Local 4: N 2752888
TDIALOG:HANDLEEVENT
Param 1: N 273
Param 2: N 40
Param 3: N 2752888
_FWH
Param 1: N 273
Param 2: N 40
Param 3: N 2752888
DIALOGBOX
Param 1: N 2752888
Param 2: N 273
Param 3: N 40
Param 4: N 2752888
Param 5: N 13
Local 1: O Classe: TDIALOG
TDIALOG:ACTIVATE
Param 1: N 4194304
Param 2: C "DLG_PEDIDO_00"
Param 3: N 2098388
Param 4: O Classe: TDIALOG
PEDIDO
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: B {|| ... }
Param 8: U
Param 9: U
Param 10: L .F.
Param 11: L .F.
Local 1: N 2098388
Local 2: S
Local 3: O Classe: TDIALOG
(b)MENUPEDIDO
Param 1: L .T.
Local 1: U
Local 2: U
Local 3: L .F.
Local 4: L .T.
TMENU:ACTIVATE
Param 1: O Classe: TMENUITEM
MENUPEDIDO
Param 1: N 50
Param 2: N 50
Param 3: O Classe: TBAR
Param 4: L .T.
Param 5: N 0
Local 1: A Tam: 2
(b)BUTTONBAT_BUILD
Param 1: O Classe: TBAR
Param 2: N 50
Param 3: N 50
Param 4: O Classe: TWINDOW
Local 1: O Classe: TMENU
TBTNBMP:CLICK
Param 1: O Classe: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 53
Param 2: N 37
Param 3: N 0
Local 1: L .T.
Local 2: S
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 3473445
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 3473445
WINRUN
Param 1: N 3473445
Param 2: N 514
Param 3: N 0
Param 4: N 3473445
Param 5: N 3
Local 1: O Classe: TBTNBMP
TWINDOW:ACTIVATE
Param 1: N 2098388
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: B {|| ... }
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: U
Param 18: U
Param 19: U
Local 1: O Classe: TWINDOW
Local 2: U
Local 3: U
Code: Select all
FUNCTION Calcula_Total_Geral(lappend)
if Verifica_Gets .or. lappend
* // vdescped --->>> PEDIR DESCONTO NA PREPARAÇÃO DO PEDIDO- Pág.3
if vdescped="S"
if (vbasedes * (vaplic/100)) # vdescReal
if ! PrimeiraEntrada
if ! PrimeiraEntrada
oDescPerc:Refresh()
endif
endif
endif
if vdescReal > 0
vaplic2 = round(vdescReal,2) * 100
if vdescReal # vdescReal1
vaplic = truncar(round(vaplic2,2) / round(vbasedes,2))
if cli->desccli # 0
vaplic:=cli->desccli
endif
endif
vdescReal1 := round(vdescReal,2)
if ! PrimeiraEntrada
oDescPerc:Refresh()
endif
endif
if vdescReal = 0
vaplic := 0
if ! PrimeiraEntrada
oDescPerc:Refresh()
endif
endif
endif
if vTotalBr = 0
vaplic := 0
vdescReal := 0
vtotGeral := 0
endif
vtotGeral := round(vTotalBr,2) - round(vdescReal,2)
if ! PrimeiraEntrada
oDescPerc:Refresh()
oTotGeral:Refresh()
endif
vparcela := round(vtotGeral / vnumetot,3)
vTotparcela := round(vparcela * vnumetot,2)
if ! PrimeiraEntrada
oValorParcela:refresh()
oTotalParcela:refresh()
endif
endif
RETURN .t