
hello.cc

include <octave/oct.h>
include <iostream.h>
DEFUN_DLD (hello, args, ,
  "[...] = hello (...)\n\nPrint greeting followed by the values of all the arguments passed.\nReturns all arguments in reverse order.")
{
  octave_value_list retval;
  octave_stdout << "Hello, world!\n";
  int nargin = args.length ();
  for (int i = 0; i < nargin; i++)
    {
      octave_value tmp = args (i);
      tmp.print (octave_stdout);
      retval (nargin-i-1) = tmp;
    }
  return retval;
}

