HomeFormat ASCII

 ASCII Example:

sub EmitCode 
{
  ($code, $depth) = @_;
  my $ret="";
  while (@code > $depth) 
    {
      local($_) = pop @code; 
      $ret .=  "</$_>\n"
    }

  while (@code < $depth) 
    {
      push (@code, ($code)); 
      $ret .= "<$code>\n"
    }
  
  if ($code[$#code] ne $code)
    {
      $ret .= "</$code[$#code]><$code>\n";
      $code[$#code] = $code;
    }
  return $ret;
}

 

Page last edited January 25, 2000
This is the archived old version of my website. The new website can be found here