.
Thanks to everyone who contributed.
From: Man-wai Chang changmw at gmail.com
To: ProFox Email List profox at 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
I noticed that the original question involved the use of EVALUATE().
Maybe the stuff inside EVALUATE() was wrong.
On Fri, Aug 16, 2013 at 2:17 AM, Gene Wirchenko ge...@telus.net wrote:
I tried
select 1/0 from ccli
(ccli being a table in my app) and no error was thrown. I
The original contained something like this:
lcExpr = 1/0
? EVALUATE(lcExpr)
From: Man-wai Chang chan...@gmail.com
To: ProFox Email List profox@leafe.com
Sent: Friday, 16 August 2013, 11:17
Subject: Re: FP: Trapping division by zero (Error 1307)
I noticed
At 08:59 2013-08-12, Allen pro...@gatwicksoftware.com wrote:
Not so, I have a select that fell over with div/0 and an on error dealt with
that.
I tried
select 1/0 from ccli
(ccli being a table in my app) and no error was thrown. I got a
cursor of 620 row of asterisks.
I
.
From: Man-wai Chang chan...@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
On Mon, Aug 12, 2013, at 10:18 AM, L ALVEY wrote:
I think it wrong that VFP does not catch this error natively, unless I've
missed a SET command or SYS() function.
Well, it has ever been thus, and probably remained thus because that's
how dBase worked back in the mists of time.
I have to say
If TRY... CATCH doesn't work, you could always use the good old ON ERROR.
On Mon, Aug 12, 2013 at 5:18 PM, L ALVEY truk...@btinternet.com wrote:
It seems that division by zero is not caught by VFP. In the command window,
type ? 1/0 return, and you get a line of asterisks, right? (I'm running
ON ERROR doesn't work either.
Laurie Alvey
From: Man-wai Chang chan...@gmail.com
To: ProFox Email List profox@leafe.com
Sent: Monday, 12 August 2013, 13:42
Subject: Re: FP: Trapping division by zero (Error 1307)
If TRY... CATCH doesn't work, you could always
On Mon, Aug 12, 2013, at 02:21 PM, L ALVEY wrote:
ON ERROR doesn't work either.
No, it's not regarded as an error or exception so the only thing that
you can do is check in code before doing a division where there's a
chance the divisor will be zero.
If you look at how various languages
In fact the only time that any version of FoxPro has ever produced a
divide by zero error is back in the days of FoxPro for Windows, when
processors got so fast that the code it used internally to calculate the
speed would fail. Some enterprising hacker then hacked the support
library to stop it
Not even ON ERROR *??? Now that's weird
From FOXHELP.CHM:
ON ERROR DO errhand WITH ;
ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
*** The next line should cause an error ***
USE nodatabase
ON ERROR restore system error handler
PROCEDURE errhand
PARAMETER merror, mess, mess1,
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
Not so, I have a select that fell over with div/0 and an on error dealt with
that.
Al
-Original Message-
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Alan
Bourke
Sent: 12 August 2013 15:28
To: profoxt...@leafe.com
Subject: Re: FP: Trapping division by zero (Error
13 matches
Mail list logo