Jump to content
Software FX Community

Latent overflow


User (Legacy)
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...