Quote:
Originally Posted by Piwoslaw
The line:
Code:
steinhart -= 273.15;
is the same as:
Code:
steinhart = steinhart - 273.15;
so this in itself is not a problem.
|
I think this is an illegal line... with the minus in front of the equal sign:
Code:
steinhart -= 273.15;
I you want steinhart to take the value of 273.15, you could say:
Code:
steinhart = 273.15;
I you want steinhart to take the value of -273.15, you could say:
Code:
steinhart = -273.15;
... or even:
Code:
steinhart = 273.15 * -1;
If you want to increase whatever value steinhart already has by 273.25, you could say:
Code:
steinhart = steinhart + 273.15;
If you want to decrease whatever value steinhart already has by 273.25, you could say:
Code:
steinhart = steinhart - 273.15;
& & &
The part of the program that is at the top, in other words above...
... is where all variable name must be declared, or else the program will not know what the strange undefined words mean.
steinhart is a variable name and it needs to be defined as such in this section.
The middle part of the program, that is below...
but above...
Is where initial values are set... in other words, you can't assume that the first time you use steinhart that it will have a value of zero, you have to make it so.
& & & & & &
You can't expect anyone to give useful advice on a program or on what it's debugger message means unless you have quoted ALL of the program and ALL of the debugger message.
Else, you're wasting everyones time, including your own.
-AC