Page 1 of 1
errsysw - division by zero
Posted: Wed Jun 03, 2009 5:52 pm
by Otto
Hello Antonio,
Is there a reason why
“by default, division by zero yields zero”
is not included.
Why is the source code errsysw.prg in FWPPC in folder classes?
Thanks in advance
Otto
Re: errsysw - division by zero
Posted: Thu Jun 04, 2009 4:35 am
by Antonio Linares
Otto,
It is included in errsysw.prg:
Code: Select all
static function ShowError( oError )
local cError := oError:Description
local n
if oError:GenCode == EG_ZERODIV
return 0
end
...
We use just one set of files for both FWH and FWPPC, so in order to have a different errsysw.prg from FWH, we need to place FWPPC one in classes folder.
Re: errsysw - division by zero
Posted: Thu Jun 04, 2009 6:45 am
by Otto
Hello Antonio,
thank you. Yes you are right. But I don’t understand why if
tisch->menge is 0 the program freezes:
nPreis := tisch->wert / tisch->menge
I use now this code which works:
if tisch->menge <> 0
nPreis := tisch->wert / tisch->menge
endif
Best regards,
Otto