Mercurial > octave-nkf
comparison libinterp/corefcn/strfns.cc @ 20616:fd0efcdb3718
use new string_value method to handle value extraction errors
* dirfns.cc, file-io.cc, gammainc.cc, help.cc, load-path.cc,
octave-link.cc, qz.cc, regexp.cc, strfns.cc, syscalls.cc, time.cc,
variables.cc: Use new string_value method.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 08 Oct 2015 19:00:51 -0400 |
parents | f90c8372b7ba |
children |
comparison
equal
deleted
inserted
replaced
20615:729a85dafba8 | 20616:fd0efcdb3718 |
---|---|
921 } | 921 } |
922 | 922 |
923 std::string prefix; | 923 std::string prefix; |
924 | 924 |
925 if (nargin > 2) | 925 if (nargin > 2) |
926 { | 926 prefix = args(2).string_value ("list_in_columns: PREFIX must be a string"); |
927 if (args(2).is_string ()) | |
928 prefix = args(2).string_value (); | |
929 else | |
930 { | |
931 error ("list_in_columns: PREFIX must be a string"); | |
932 return retval; | |
933 } | |
934 } | |
935 | 927 |
936 std::ostringstream buf; | 928 std::ostringstream buf; |
937 | 929 |
938 s.list_in_columns (buf, width, prefix); | 930 s.list_in_columns (buf, width, prefix); |
939 | 931 |