Jump to content
Software FX Community

Latent overflow


User (Legacy)

Recommended Posts

Posted

This is a good one. Even though it seems like magic it makes sense.

The floating point overflow is generated by Chart FX not VB, CHART_HIDDEN

can not be assigned to an XValue (shame on us for not documenting this),

however Chart FX dos not show any message, the Floating Point library

however, keeps a flag of the last exception therefore the first floating

point operation is performed in VB after the Chart FX overflow causes VB to

display the error message.

The first time this happened to me I though I was going crazy but then after

some research I found out what was happening.

--

FP

Software FX, Inc.

  • 2 months later...
Posted

Hi,

Thought I'd share this little info titbit that would have been handy to

me about 2 months ago:

- Don't ever set the xvalue() to CHART_HIDDEN

I did it "to be sure" and "cause i was a lazy" at the time, and have

discovered that it causes overflows later in execution at fairly

unrelated bits of code such as:

dim test as double

dim test2 as double

test = test2 ' overflow!

Unbelievable as it seems, killing the line that set the xvalue stops the

overflow.

Hope it helps someone

Paul

Posted

Ah so thats why it happens... It really bugged me and I had no idea wtf 

was going on, especially since the line the error would occur on would

be in a completely seperate part of the app!

Maybe Microsoft should put a little kb article about how these sort of

"bugs" are handled by VB (ie confusingly - it should clear the flag

before it performs the ops!).

Thanks,

Paul

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...