Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #658 > unrolled thread

Crashing on DEQU

Started byMartin <spam@spam.spam>
First post2011-04-04 09:39 +0100
Last post2011-04-04 11:32 +0200
Articles 4 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Crashing on DEQU Martin <spam@spam.spam> - 2011-04-04 09:39 +0100
    Re: Crashing on DEQU "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2011-04-04 18:57 +1000
      Re: Crashing on DEQU Martin <spam@spam.spam> - 2011-04-04 10:11 +0100
    Re: Crashing on DEQU "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2011-04-04 11:32 +0200

#658 — Crashing on DEQU

FromMartin <spam@spam.spam>
Date2011-04-04 09:39 +0100
SubjectCrashing on DEQU
Message-ID<Lsfmp.2637$Ir.1121@newsfe13.ams2>
Hello

We are getting an error on a string compare line.
LOCAL cTable AS STRING


     cTable := SELF:dbOptParam:FIELDGET(#OP_TableNo)

     DO CASE
       CASE cTable <= Space(10)  <----- This line is crashing




OP_TableNo  C  10

according to the error system it is going wrong in DEQU (FuncSym) with 
Gencode 30.

Arg 1 is Numeric 2.00
Arg 2 is the text from the field

It is crashing on ArgNum 2, expecting a Numeric but getting a string

Any ideas please?

[toc] | [next] | [standalone]


#661

From"Stephen Quinn" <stevejqNO@bigpondSPAM.net.au>
Date2011-04-04 18:57 +1000
Message-ID<qIfmp.528$CS3.94@viwinnwfe01.internal.bigpond.com>
In reply to#658
Martin

What's in cTable when it crashes??
Is the first character in cTable a numeric??

What happens when you
    x := Space(10)

    CASE cTable <= x

Why not use
    CASE ! Empty( cTable )

CYA
Steve


[toc] | [prev] | [next] | [standalone]


#662

FromMartin <spam@spam.spam>
Date2011-04-04 10:11 +0100
Message-ID<5Xfmp.2313$Vm5.39@newsfe30.ams2>
In reply to#661
A String starting with R

More info come to light, (more than the erro log passed to me)

The .exe was being called by MSVC compiler in debug mode so there may be 
little anyone here could do.

Running normally all is OK.

The code in question has been running for ages anyway.

But still should not crash like this

Thanks

Martin
On 04/04/2011 09:57, Stephen Quinn wrote:
> Martin
>
> What's in cTable when it crashes??
> Is the first character in cTable a numeric??
>
> What happens when you
>      x := Space(10)
>
>      CASE cTable<= x
>
> Why not use
>      CASE ! Empty( cTable )
>
> CYA
> Steve
>
>
>

[toc] | [prev] | [next] | [standalone]


#663

From"Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Date2011-04-04 11:32 +0200
Message-ID<8vti07FoucU1@mid.individual.net>
In reply to#658
Hi Martin,

Space(10) returns a String with 10 characters ( ten times CHR(32) )

? Space(10) == "          "       // TRUE  (with 10 CHR(32) )
? Space(10) == "   "             // FALSE
? Space(10) == NULL_STRING // FALSE
? Space(10) == "ABCGE "         // FALSE
? Empty(Space(10))                 // TRUE
? Space(10) == 25                    // Compiler error

If you look to the code above, you will find that the comparison may be 
ambiguous.

regards
Urs

"Martin" <spam@spam.spam> schrieb im Newsbeitrag 
news:Lsfmp.2637$Ir.1121@newsfe13.ams2...
> Hello
>
> We are getting an error on a string compare line.
> LOCAL cTable AS STRING
>
>
>     cTable := SELF:dbOptParam:FIELDGET(#OP_TableNo)
>
>     DO CASE
>       CASE cTable <= Space(10)  <----- This line is crashing
>
>
>
>
> OP_TableNo  C  10
>
> according to the error system it is going wrong in DEQU (FuncSym) with 
> Gencode 30.
>
> Arg 1 is Numeric 2.00
> Arg 2 is the text from the field
>
> It is crashing on ArgNum 2, expecting a Numeric but getting a string
>
> Any ideas please? 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web