Home All Groups Group Topic Archive Search About

Strange output from TextMatrix

Author
2 Mar 2009 4:32 PM
Jeff
On a production machine, we had a strange output from the following
line of code:

grid.TextMatrix(nRow, COL_LASTVALUE) = Format(fLastValue, strFormat)

(where strFormat is ".00")
nRow and COL_LASTVALUE are value, so the quirk lies elsewhere.

The value that shows up occasionally in the cell is this:  -1.#IND

Since it is a production machine, we are unable to debug or step
through the code to see what fLastValue is equal to.  This line of
code runs on a timer, and sometimes the values that appear are valid
numbers; other times it is this strange output which I've never seen.
We've seen all kinds of things in development and testing, but this
one is new to me.  Any ideas?

Author
2 Mar 2009 4:40 PM
Jeff
On Mar 2, 10:32 am, Jeff <jr***@usa.net> wrote:
Show quoteHide quote
> On a production machine, we had a strange output from the following
> line of code:
>
> grid.TextMatrix(nRow, COL_LASTVALUE) = Format(fLastValue, strFormat)
>
> (where strFormat is ".00")
> nRow and COL_LASTVALUE are value, so the quirk lies elsewhere.
>
> The value that shows up occasionally in the cell is this:  -1.#IND
>
> Since it is a production machine, we are unable to debug or step
> through the code to see what fLastValue is equal to.  This line of
> code runs on a timer, and sometimes the values that appear are valid
> numbers; other times it is this strange output which I've never seen.
> We've seen all kinds of things in development and testing, but this
> one is new to me.  Any ideas?

Nevermind -- looks like it's trying to format infinite.
Author
2 Mar 2009 5:28 PM
Ralph
"Jeff" <jr***@usa.net> wrote in message
news:8ee8e36a-7b8a-4272-8dd7-68b2ad178aa9@r36g2000prf.googlegroups.com...
On Mar 2, 10:32 am, Jeff <jr***@usa.net> wrote:
>
> Since it is a production machine, we are unable to debug or step
> through the code to see what fLastValue is equal to. This line of
> code runs on a timer, and sometimes the values that appear are valid
> numbers; other times it is this strange output which I've never seen.
> We've seen all kinds of things in development and testing, but this
> one is new to me. Any ideas?

For the future, on a production box or any box where you cannot install a
development package, checkout WinDbg. WinDbg is the Windows debugger which
can be installed with minimum impact - much like Dr. Watson or any of the
'trace' utilities. WinDbg combined with OutputDebugString, DebugBreak, and a
symbol-compiled program/component can provide a ton of information, very
quickly - again, in a very unobtrusive way.