view examples/code/helloworld.cc @ 31213:bc385e42e09a

NEWS.8.md: Announce new legend property "itemhitfcn" * NEWS.8.md: Announce new legend property "itemhitfcn".
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Mon, 29 Aug 2022 18:36:17 +0200
parents 185f850aa543
children
line wrap: on
line source

#include <octave/oct.h>

DEFUN_DLD (helloworld, args, nargout,
           "Hello World Help String")
{
  octave_stdout << "Hello World has "
                << args.length () << " input arguments and "
                << nargout << " output arguments.\n";

  // Return empty matrices for any outputs
  octave_value_list retval (nargout);
  for (int i = 0; i < nargout; i++)
    retval(i) = octave_value (Matrix ());

  return retval;
}