FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC errsysw - division by zero
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
errsysw - division by zero
Posted: Wed Jun 03, 2009 05:52 PM

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: errsysw - division by zero
Posted: Thu Jun 04, 2009 04:35 AM
Otto,

It is included in errsysw.prg:
Code (fw): Select all Collapse
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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: errsysw - division by zero
Posted: Thu Jun 04, 2009 06:45 AM

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

Continue the discussion