| Code Perl |
sub printLog {local($cas,$nom,$val) = @_;
local($nomFic,$x,$n);
$nomFic = $nomLog0.$cas."Num".$nomType;
$x = "X";
srand $$; until(open(F1,">>".$nomFic)) {select(undef,undef,undef,rand)}; print F1 $x; close(F1);
$n = (-s $nomFic);
$nomFic = $nomLog0.$cas."Id".$nomType;
$x = &Trace($nom,$val);
srand $$; until(open(F1,">>".$nomFic)) {select(undef,undef,undef,rand)}; print F1 $x; close(F1);
return $n; return 0
}
|
| Code JavaScript |
function printLog(cas,nom,val) {
var nomFic,x,n;
nomFic = nomLog0+cas+"Num"+nomType;
x = "X";
eval(nomFic+" += x");
n = eval(nomFic).length;
nomFic = nomLog0+cas+"Id"+nomType;
x = Trace(nom,val);
eval(nomFic+" += x");
return n; return 0
}
|