Zitat von
sk.Silvia:
the adress of ExportVar and Ratio is the same, thats OK
but why is the value of tmpr not same as the value of Ratio=ExportVar (the value of tmpr is 0 and the value of Ratio is 1,58 )?
On the left side of your Code you see a fiew blue points. In some lines these blue points are missing. This means, that this line of code has not been compiled, most times, because it was unnecessary. Here you're propably not using the variable temp anymore after the assignment, so it is unnecessary to execute that operation.
As short answer: the variable temp has the value 0, because the value has not been assigned for optimation reasons.
There are two ways to avoid this:
- you do something with the variable after the assignment. A ShowMessage(FloatToStr(temp)), for example.
- you disable compiler Optimation for the necessary lines of code, by using the {$O+/-}-Flags.
greetz
Mike