Não é mais possível fazer postagens ou usar assinaturas novas da Usenet nos Grupos do Google. O conteúdo histórico continua disponível.
Dismiss

Odd Error Message

12 visualizações
Pular para a primeira mensagem não lida

Gene Wirchenko

não lida,
27 de dez. de 2012, 18:18:2027/12/2012
para
Dear VFPers:

I just got an odd error message that had me puzzled for a few
minutes:
Expression is not valid outside of WITH/ENDWITH.
The error line was a return statement:
return .t
The error message is technically accurate but is a bit confusing. The
error is that I forgot the second period of ".t.".

Sincerely,

Gene Wirchenko

Dan Freeman

não lida,
28 de dez. de 2012, 10:50:2828/12/2012
para
Gene Wirchenko explained :
Strange, but not the strangest error in VFP's vocabulary. :-)

And the error message itself is actually wrong. RETURN should *never*
be used inside WITH/ENDWITH. That's a big cause of C0000005 errors.

Dan


Bernhard Sander

não lida,
3 de jan. de 2013, 07:04:1303/01/2013
para
Hi Gene,

> I just got an odd error message that had me puzzled for a few
> minutes:
> Expression is not valid outside of WITH/ENDWITH.
> The error line was a return statement:
> return .t
> The error message is technically accurate but is a bit confusing. The
> error is that I forgot the second period of ".t.".

Hm, RETURN <value> is the common way to return the value of a function call.

In your line, .t is correct syntax, but only allowed, if it is contained in a
WITH/ENDWITH structure. Then .t is a property of the WITH-object. So the error
message is very correct.

Regards
Bernhard Sander

Gene Wirchenko

não lida,
3 de jan. de 2013, 12:52:5403/01/2013
para
On Thu, 03 Jan 2013 13:04:13 +0100, Bernhard Sander <fu...@kein.spam>
wrote:

>> I just got an odd error message that had me puzzled for a few
>> minutes:
>> Expression is not valid outside of WITH/ENDWITH.
>> The error line was a return statement:
>> return .t
>> The error message is technically accurate but is a bit confusing. The
>> error is that I forgot the second period of ".t.".
>
>Hm, RETURN <value> is the common way to return the value of a function call.

In my case, the value to return was .t.

>In your line, .t is correct syntax, but only allowed, if it is contained in a
>WITH/ENDWITH structure. Then .t is a property of the WITH-object. So the error
>message is very correct.

Sure, but quite misleading. The error message made no mention of
the real error.

Sincerely,

Gene Wirchenko

Bernhard Sander

não lida,
4 de jan. de 2013, 06:20:2104/01/2013
para
Hi Gene,

>>> Expression is not valid outside of WITH/ENDWITH.
>>> The error line was a return statement:
>>> return .t

> Sure, but quite misleading. The error message made no mention of
> the real error.
I think, it exactly describes the error:
.t is valid inside of WITH/ENDWITH, but is not valid outside.

Indeed, the error message does not meet your intention.
I think, you can make a lot of money if you succeed to build such an error
interpreter...

Regards
Bernhard Sander

Dan Freeman

não lida,
4 de jan. de 2013, 12:50:5204/01/2013
para
Bernhard Sander pretended :
It's an example of an error message being correct with surgical
precision but wrong at the same time. A normal situation for error
messages (or tech support).

Dan


0 nova mensagem