bobhaha
0
- Joined
- May 31, 2009
- Messages
- 3,239
- Points
- 63
ok ok I know what your going to say.. thats so 80's man! but I enjoy using pascal LOL
any way here is my problem
ok i made a program which works out the value of x from a quadratic formula when you enter values for a, b and c (which are "real" numbers) it puts the numbers in an equation but it does not work! it compiles fine.. but when i try using the program it says ERROR 207: invalid floating point operation
This is the line of code that it points too
x:=-b+sqrt(((b*b)-(4*a*c))/2*a);
I think its got something to do with all the operations happening in one line.. do you think this is a problem? also is there supposed to be any statement under "uses" (eg uses crt) so I can use the sqrt operation or multiple operations?
Thanks in advance.. i also have posted this in a programming forum.. but no replies at all!!
PS: +rep to who ever works it out.. i can also put the whole source code up if you need it.. its not that long!
-Adrian
any way here is my problem
ok i made a program which works out the value of x from a quadratic formula when you enter values for a, b and c (which are "real" numbers) it puts the numbers in an equation but it does not work! it compiles fine.. but when i try using the program it says ERROR 207: invalid floating point operation
This is the line of code that it points too
x:=-b+sqrt(((b*b)-(4*a*c))/2*a);
I think its got something to do with all the operations happening in one line.. do you think this is a problem? also is there supposed to be any statement under "uses" (eg uses crt) so I can use the sqrt operation or multiple operations?
Thanks in advance.. i also have posted this in a programming forum.. but no replies at all!!
PS: +rep to who ever works it out.. i can also put the whole source code up if you need it.. its not that long!
-Adrian