Author: L ALVEY
Posted: 2013-08-13 at 03:50:20
I used a similar method in an earlier version of the screen which worked fine. In my form, I used the MOD() function which catches the error, as does the % operator. There is some inconsistency here in that % traps the error but / doesn't.
Thanks to everyone who contributed.
________________________________
From: Man-wai Chang <changmw@gmail.com>
To: ProFox Email List <profox@leafe.com>
Sent: Monday, 12 August 2013, 15:27
Subject: Re: FP: Trapping division by zero (Error 1307)
This is my Foxpro/DOS way of catching division by zero:
on error *
x=1/0
if if "*"$x
? x
? "divide by zero"
endif
on error
--
.~. Might, Courage, Vision. SINCERITY!
/ v \ 64-bit Ubuntu 9.10 (Linux kernel 2.6.39.3)
/( _ )\ http://sites.google.com/site/changmw
^ ^ May the Force and farces be with you!
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAGv=MJBG8icTrciptu-DsJZmL7F9FW+WFP1C=Nbsd1ghx_Eg-w@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/1376383820.96482.YahooMailNeo@web87906.mail.ir2.yahoo.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.