Hi, I'm unfamiliar with PHP, and I'm trying to hand convert the PHP code below.
I'm having trouble understanding the $e and $n variables.
At first they seem to be strings, then they seem to become numbers.
I can only guess they are numbers the whole time?
Steve (Delphi 2007 & XP)
I'm having trouble understanding the $e and $n variables.
At first they seem to be strings, then they seem to become numbers.
I can only guess they are numbers the whole time?
Code:
$pr=$le/2; // $le is the length of $num below
$n=substr($num,$pr); //$num is a string containing numbers so I assumed $n was a string too?
$e=substr($num,0,$pr); // ditto $e. are they converted to numbers here?
$pr=pow(10.0,(5.0-$pr));
$T1=ord(substr($lett,0,1))-65; // here I clearly see letter to number conversion, so what about above?
if($T1>8)
{
$T1=$T1-1;
}
$e=100000.0*($T1%5.0)+$e*$pr; // now $e and $n appear to be numbers?
$n=$n*$pr+100000.0*(4.0-floor($T1/5.0));
Steve (Delphi 2007 & XP)