//-------------------------------------------------------------------
//
// banner
//
// Syntax: banner(string)
//
//  Prints the string in the center of the page with horizontal
//  lines above and below
//
// Originally written for MATLAB by Lee P. Peterson
// Modified by Jeff Layton and ported to RLaB by Jeff Layton
//-------------------------------------------------------------------

rfile center

banner = function(string)
{
   local(width,line,j)

   if (string.class != "string") {
       error("banner only works with strings.")
   }

   width=length(string);
   line="";

   for (j in 1:width) {
     line=line+"-";
   }

// printf("%s"," ");
   center(line);
   center(string);
   center(line);
// printf("%s"," ");

};
