errsysw - division by zero

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

errsysw - division by zero

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: errsysw - division by zero

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: errsysw - division by zero

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Post Reply