Mercurial > octave
comparison src/data.cc @ 1728:42b4f904f1af
[project @ 1996-01-09 11:36:01 by jwe]
author | jwe |
---|---|
date | Tue, 09 Jan 1996 11:41:43 +0000 |
parents | 0d9e10d10bd7 |
children | a02f140ed897 |
comparison
equal
deleted
inserted
replaced
1727:ba9b08842dbe | 1728:42b4f904f1af |
---|---|
30 */ | 30 */ |
31 | 31 |
32 #ifdef HAVE_CONFIG_H | 32 #ifdef HAVE_CONFIG_H |
33 #include <config.h> | 33 #include <config.h> |
34 #endif | 34 #endif |
35 | |
36 #include <string> | |
35 | 37 |
36 #include "defun.h" | 38 #include "defun.h" |
37 #include "error.h" | 39 #include "error.h" |
38 #include "gripes.h" | 40 #include "gripes.h" |
39 #include "help.h" | 41 #include "help.h" |
802 if (nargin == 2) | 804 if (nargin == 2) |
803 { | 805 { |
804 retval = 0.0; | 806 retval = 0.0; |
805 if (args(0).is_map () && args(1).is_string ()) | 807 if (args(0).is_map () && args(1).is_string ()) |
806 { | 808 { |
807 const char *s = args(1).string_value (); | 809 string tstr = args(1).string_value (); |
810 const char *s = tstr.c_str (); | |
808 tree_constant tmp = args(0).lookup_map_element (s, 0, 1); | 811 tree_constant tmp = args(0).lookup_map_element (s, 0, 1); |
809 retval = (double) tmp.is_defined (); | 812 retval = (double) tmp.is_defined (); |
810 } | 813 } |
811 } | 814 } |
812 else | 815 else |