if(isset($program)){
if(!strcmp(strtoupper($showbytecodes), "ON")){
$showbytecodes=1; $sbc='CHECKED';
}
else{
$showbytecodes=0; $sbc='';
}
if(!strcmp(strtoupper($stacktrace), "ON")){
$stacktrace=1; $stacktr='CHECKED';
}
else{
$stacktrace=0; $stacktr='';
}
if(!strcmp(strtoupper($loadlibrary), "ON")){
$loadlibrary=1; $loadlib='CHECKED';
}
else{
$loadlibrary=0; $loadlib='';
}
init();
if($loadlibrary){
$stflag = $stacktrace; $stacktrace = 0;
$lname = "library.scm";
$fp = @fopen($lname, "r");
if($fp){
$library = fread($fp, filesize($lname));
fclose($fp);
tokenize($library);
$form = 1; $successes = 0;
while(isset($tokens[$base])){
$exp = readexp();
if(is_array($exp)){
$bcode = array(array('start')); $bc=1;
compile($exp);
$outputstr = '';
if(run()){
echo
"Library: form $form: " .
$errmsg .
"
\n";
}
else{
$successes++;
}
}
else{
echo
"Library: form $form: " .
$errmsg .
"
\n";
break;
}
$form++;
}
}
else{
echo
"" .
"Couldn't load library: $lname" .
"
\n";
}
if($successes){
echo
"" .
"Library: $lname: loaded $successes " .
"form" . ($succeses==1 ? '' : 's') . "." .
"
\n";
}
$stacktrace = $stflag;
}
$program = stripslashes($program);
tokenize($program);
$form = 1; $imageindex = 0;
while(isset($tokens[$base])){
$exp = readexp();
if(is_array($exp)){
echo "
"; $outputstr = ''; if(run()){ echo "" . $errmsg . "\n"; if(strlen($outputstr)>0){ echo "
\n"; } printargstack(); echo "
Output\n"; echo "
" . htmlspecialchars($outputstr) . "\n"; } echo "
\n"; if(count($imagedata[4])>0){ $images[$imageindex] = $imagedata; echo "
\n"; echo "\n"; echo " |