Divide Overflow

Richard Kreiss rkreiss at verizon.net
Wed Jan 11 09:42:28 PST 2017


Top Post:

Insure that the devisor is not blank as filePro may consider this a zero(0) also.

Another solution might be to test the division using dummy fields and check that the answer does not contain a "/" (per Ken's earlier suggestion).  If there is an error, put up an errorbox showing the values used,  If you really want to get fancy with this, when the answer contains a "/". Then check if it co "/D" or "/O", if this is true the error message might show the values and either a "divide By 0 attempted" or "result field needs to be made larger".  Yes, just displaying the result field would show the criptic filePro error.  However, putting this in English would be helpful for those who don't know what those values mean.

I have always found that making is simpler for users to use involved more programming to make it easier. 


Richard Kreiss
GCC Consulting



> -----Original Message-----
> From: Filepro-list [mailto:filepro-list-
> bounces+rkreiss=verizon.net at lists.celestial.com] On Behalf Of Scott Walker via
> Filepro-list
> Sent: Wednesday, January 11, 2017 10:42 AM
> To: filepro-list at lists.celestial.com
> Subject: RE: Divide Overflow
> 
> In a perfect world, I agree.
> 
> 
> 
> If the divisor is “0” then don’t do the division in the first place.
> 
> 
> 
> But in spite of my best efforts over the years, my customers still occasionally get
> a “\d0” error, normally when running a report, and I have to track it down.  Not
> a filePro error, but rather a programming oversite on my part.
> 
> 
> 
> If I knew then (over 30 years ago, when I originally wrote many of my processing
> tables),  what I know now (now), things would be A LOT cleaner.
> 
> 
> 
> Regards,
> 
> 
> 
> Scott
> 
> 
> 
> Scott Walker
> 
> scottwalker1956 at gmail.com <mailto:scottwalker1956 at gmail.com>
> 
> 
> 
> 
> 
> 
> 
> From: fpgroups . [mailto:fpgroups at gmail.com]
> Sent: Wednesday, January 11, 2017 10:06 AM
> To: Scott Walker <scottwalker1956 at gmail.com>
> Cc: filePro Mailing List <filepro-list at lists.celestial.com>
> Subject: RE: Divide Overflow
> 
> 
> 
> Why do this after the facts?  Adress it at time the value is set and ensure data
> integrity
> 
> 
> 
> On Jan 11, 2017 9:59 AM, "Scott Walker via Filepro-list" <filepro-
> list at lists.celestial.com <mailto:filepro-list at lists.celestial.com> > wrote:
> 
> How about in processing check to see if the field contains "\D0"
> 
> Example:
> 
> If:     7 co "\DO"
> Then:   show"@Record# "<@rn<"has a Divide by zero error in field# 7";show""
> 
> 
> That seems to find them on my system.
> 
> Regards,
> Scott
> 
> Scott Walker
> scottwalker1956 at ramsystemscorp.com
> <mailto:scottwalker1956 at ramsystemscorp.com>
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Filepro-list
> [mailto:filepro-list-bounces+scottwalker1956 <mailto:filepro-list-
> bounces%2Bscottwalker1956> =gmail.com at lists.celestial.com] On Behalf Of
> Rami Mantoura via Filepro-list
> Sent: Wednesday, January 11, 2017 9:53 AM
> To: FilePro Mailing List <filepro-list at lists.celestial.com <mailto:filepro-
> list at lists.celestial.com> >
> Subject: Divide Overflow
> 
> Is there a way of checking for a divide overflow in processing (/DO)?
> 
> Thanks
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://mailman.celestial.com/pipermail/filepro-list/attachments/20170111/ca
> <http://mailman.celestial.com/pipermail/filepro-
> list/attachments/20170111/caa328f4/attachment.html>
> a328f4/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com <mailto:Filepro-list at lists.celestial.com>
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com <mailto:Filepro-list at lists.celestial.com>
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-
> list/attachments/20170111/57b8a857/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list