(In reply to
re: Just an observation by Charlie)
The line
if P=int(P) then P=int(P)
looks rather unusual. P is verified to be an integer because it equals its integer part--the two are equal. Now we assign the integral part to P.
In UBASIC, P was originally a floating point number (because it was the result of a division), which happened, in the true case, to have an integral value. But the prmdiv function requires an argument of type integer, not just an integral value. The assignmen of P=int(P) not only changes P's value, but its type as well. From a mathematical point of view the line looks redundant.
|
Posted by Charlie
on 2020-07-14 07:35:28 |