Well that was a short lived excursion into ReadStr . . . .
In an attempt to further understand the - what I consider 'Weird' - behaviour, I've been trying to evaluate the value assigned to A & B - ie. the result of (T1*Ratio) - by assigning it to a String Variable (TmpStr) using ReadStr(TmpStr,A). This appeared to work - the project compiled and ran showing 'A' in a memo.
However I'd had a Compile OK but a 106 error at run-time indicating that the argument should be 'Char' ??? This was when I'd created a second 'String' variable - RStr :
exactly the same as TmpStr - and using ReadStr(RStr,A) is not acceptable! As I said - Weird.
Repeat
A := T1*Ratio;
B := Int(A);
if T1< 22 then
begin
TmpStr := IntToStr(T1);
// ReadStr(RStr,T1);
WriteMemo('T1- I2S '+TmpStr,false);
ReadStr(TmpStr,T1);
WriteMemo('T1- Read '+TmpStr,false);
TmpStr := FloatToStr(Ratio);
WriteMemo('Ratio - F2S '+TmpStr,false);
ReadStr(TmpStr,Ratio);
WriteMemo('Ratio - Read '+TmpStr,false);
TmpStr := FloatToStr(A);
WriteMemo(' A- F '+TmpStr,false);
ReadStr(TmpStr,A);
WriteMemo(' A- R '+TmpStr,false);
// ReadStr(RStr,B);
TmpStr := FloatToStr(B);
WriteMemo(' B- F '+TmpStr+' R - '+RStr,true);
end;
Good := A = B;
If I un-comment lines 9 or 24 then although it compiles the runtime error 106 always fires.
Whilst I've been evaluating and writing this, Paolo & WP have made further suggestions and I've now successfully incorporated WPs 'SameValue' suggestion - I'd tried many variants previously but always got something wrong!
often being warned that 'You can't do that' but never fully understanding why.
I'll not bother trying to understand why ReadStr seems to dislike my use of RStr any further and thank all contributors for their stirling efforts to solve my issues.