Hello, Marco.
Once I played with bin 2 dec 2 bin and I recall one of them was error-prone. If someone has such a code, I'd like to ask for a release.
Also, hex 2 dec 2 hex: same thing, one was accurate, another was not. Please.
Thanks for the contribution.
(hey, where's the Archive? My dropbox is now plenty of space!

)
@FluxMissile:
Well, well... I forgot I learned some tricks over time, so...
Code: Select all
// as Leo Cohen would say, "aaaah!, the wonders of a Load()..." :P
//============== test tool, beta:
//$tst = formatlist(<clipboard>, c, <crlf>); $otkCNT = gettoken($tst, count, <crlf>); $tst = formatlist($tst, d, <crlf>); echo "original: $otkCNT<crlf>" . "now it haves: " . gettoken($tst, count, <crlf>) . " items.";
$max = 102; // needed for reference progression table
$LalphaU = "A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z";
status "$max items on the go. Cya!";
$bin = 2;
$tk = 2;
while ($tk < $max) {
$fct = 2;
$tk = $tk * $fct;
$bin = $bin . "|" . $tk;
}
$re = "";
$reX = "";
$bin = trim($bin, "|");
$tt = gettoken($bin, count, "|");
$a1 = <<<#
set $lst;
foreach($j, "$bin"){
set $i;
#;
$a3 = ' while($i++ < $j){' . "<crlf>";
foreach($tk1, "$bin", "|") {
if($tk == "") { step; break; }
else { }
$tk = $tk1 * 2; // lazy fix
$tst = gettoken($bin, -1, "|");
$tst2 = strpos("$bin", "$tk");
if($tst2 == "-1") { break; }
else { }
$op++;
$reX = '.eval($' . gettoken($LalphaU, $op, "|") . '($i/' . "$tk1" . '%2))' . "$reX";
$z = ' $' . gettoken($LalphaU, $op, "|") . " = ($j<" . "$tk" . ")? " . quote("property") . " : " . quote("") . ";";
$re = "$re" . "$z" . "<crlf>";
}
$a2 = "$re" . "<crlf>";
$a4 = ' $' . 'lst = $' . lst . "$reX" . '.$' . 'i' . '%' . '2.' . quote('<crlf>') . ';';
$a5 = "<crlf> }" . "<crlf> }" . "<crlf>" . ' $' . 'lst = regexreplace("$' . 'lst", ' . quote("1") . ', ' . quote("A") . ');' . "<crlf>";
$a6 = ' $' . 'lst = regexreplace("$' . 'lst", ' . quote("0") . ', ' . quote("a") . ');' . "<crlf>";
$a7 = "<crlf>" . ' status "done!"; text ' . quote("$" . 'cnt items:<crlf 2>$' . 'tst') . ";" . ' status "";';
$a7c = "<crlf>" . ' $' . 'tst = gettoken($' . 'lst, $' . 'max, <crlf>, , 1);';
$a7d = "<crlf>" . ' $' . 'cnt = gettoken($' . 'tst, count, <crlf>);';
$a7A = "<crlf>" . ' $' . 'max = ' . "$max" . ';';
$a8 = "$a1" . "$a2" . "$a3" . "$a4" . "$a5" . "$a6" . "$a7A" . "$a7c" . "$a7d" . "$a7";
wait 1000;
if($max <= "1023") {
status "Please wait..."; wait 1000;
}
else { beep 800,100; status "Please wait, this WILL take a time!", "FF0000", "alert"; }
load $a8, , s;
I just couldn't produce a reliable test code but for rude analysis on the smaller segments, all seems ok. (If someone can help with a uniqueness token verification code, case-sensitive, please do so!)