BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exception class EInvalidOp: invalid floating point operation

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
jawilson
Guest





PostPosted: Sun Feb 19, 2006 9:03 pm    Post subject: Exception class EInvalidOp: invalid floating point operation Reply with quote



Hello,

I am working on a project in BDS 2006, and am running into an error I
don't understand. Here is the relevant code:

//---------------------------------------------------
double splitLoc = 0, fs = 512;
double timeRange[3];
int tArr[3];

// these values come from a file, and just happen to be in the one I am
using now
timeRange[0] = -1.5;
tArr[0] = 0;
tArr[2] = 0;

// This is where the error occurs
splitLoc += timeRange[0] * fs; //this is fine
splitLoc += (double)(tArr[2] - tArr[0]);
//----------------------------------------------------

This last line always throws the exception:
First chance exception at $7C81EB33. Exception class EInvalidOp with
message 'Invalid floating point operation'. Process test.exe (3040)

The program compiles fine, so what else could be causing this?
Thanks!
Adam
Back to top
jawilson
Guest





PostPosted: Sun Feb 19, 2006 10:03 pm    Post subject: Re: Exception class EInvalidOp: invalid floating point opera Reply with quote



Update: I just tested it out with C++Builder 6, and it works fine. Is
there a project option (in the compiler, maybe?) that has changed from
C++B 6?
Thanks!
Adam
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.