view examples/helloworld.cc @ 16590:2d968b7830d6

handle A, R, and W fopen modes correctly (bug #38851) * file-io.cc (normalize_fopen_mode): New function. Handle 'A'. Also handle 'b' and 't' suffixes here. Use Octave:fopen-mode warning id. (fopen_mode_to_ios_mode): Only convert from mode string to ios mode. (do_stream_open): Call normalize_fopen_mode before calling fopen_mode_to_ios_mode. Don't process mode string directly. * io.tst: Update test for fopen modes.
author John W. Eaton <jwe@octave.org>
date Mon, 29 Apr 2013 13:46:55 -0400
parents db1f49eaba6b
children be41c30bcb44
line wrap: on
line source

#include <octave/oct.h>

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