Mercurial > hg > octave-nkf
changeset 12703:d326be468b13 stable
doc: str2double() inputs which cannot be parsed return NaN.
* str2double.cc: Update docstring with warning about inputs which cannot be
parsed returning NaN.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 04 Jun 2011 16:03:21 -0700 |
parents | 013cd94d8d7f |
children | da6cbb752368 7c8b50cd4fb4 |
files | src/DLD-FUNCTIONS/str2double.cc |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/str2double.cc +++ b/src/DLD-FUNCTIONS/str2double.cc @@ -244,8 +244,11 @@ case each element is converted and an array of the same dimensions is\n\ returned.\n\ \n\ -@code{str2double} can replace @code{str2num}, and it avoids the use of\n\ -@code{eval} on unknown data.\n\ +@code{str2double} returns NaN for elements of @var{s} which cannot be\n\ +converted.\n\ +\n\ +@code{str2double} can replace @code{str2num}, and it avoids the security\n\ +risk of using @code{eval} on unknown data.\n\ @seealso{str2num}\n\ @end deftypefn") {