Mercurial > hg > octave-avbm
comparison src/parse.y @ 4233:ccfdb55c8156
[project @ 2002-12-20 22:43:54 by jwe]
author | jwe |
---|---|
date | Fri, 20 Dec 2002 22:43:55 +0000 |
parents | 23d06c9e1edd |
children | 90e44267e8cf |
comparison
equal
deleted
inserted
replaced
4232:b032ebd54586 | 4233:ccfdb55c8156 |
---|---|
3594 std::string s = arg.string_value (); | 3594 std::string s = arg.string_value (); |
3595 | 3595 |
3596 if (error_state) | 3596 if (error_state) |
3597 { | 3597 { |
3598 error ("eval: expecting std::string argument"); | 3598 error ("eval: expecting std::string argument"); |
3599 return -1.0; | 3599 return octave_value (-1); |
3600 } | 3600 } |
3601 | 3601 |
3602 return eval_string (s, silent, parse_status, nargout); | 3602 return eval_string (s, silent, parse_status, nargout); |
3603 } | 3603 } |
3604 | 3604 |
3739 } | 3739 } |
3740 | 3740 |
3741 void | 3741 void |
3742 symbols_of_parse (void) | 3742 symbols_of_parse (void) |
3743 { | 3743 { |
3744 DEFVAR (default_eval_print_flag, 1.0, default_eval_print_flag, | 3744 DEFVAR (default_eval_print_flag, true, default_eval_print_flag, |
3745 "-*- texinfo -*-\n\ | 3745 "-*- texinfo -*-\n\ |
3746 @defvr {Built-in Variable} default_eval_print_flag\n\ | 3746 @defvr {Built-in Variable} default_eval_print_flag\n\ |
3747 If the value of this variable is nonzero, Octave prints the results of\n\ | 3747 If the value of this variable is nonzero, Octave prints the results of\n\ |
3748 commands executed by @code{eval} that do not end with semicolons. If it\n\ | 3748 commands executed by @code{eval} that do not end with semicolons. If it\n\ |
3749 is zero, automatic printing is suppressed. The default value is 1.\n\ | 3749 is zero, automatic printing is suppressed. The default value is 1.\n\ |
3750 @end defvr"); | 3750 @end defvr"); |
3751 | 3751 |
3752 DEFVAR (warn_assign_as_truth_value, 1.0, warn_assign_as_truth_value, | 3752 DEFVAR (warn_assign_as_truth_value, true, warn_assign_as_truth_value, |
3753 "-*- texinfo -*-\n\ | 3753 "-*- texinfo -*-\n\ |
3754 @defvr {Built-in Variable} warn_assign_as_truth_value\n\ | 3754 @defvr {Built-in Variable} warn_assign_as_truth_value\n\ |
3755 If the value of @code{warn_assign_as_truth_value} is nonzero, a\n\ | 3755 If the value of @code{warn_assign_as_truth_value} is nonzero, a\n\ |
3756 warning is issued for statements like\n\ | 3756 warning is issued for statements like\n\ |
3757 \n\ | 3757 \n\ |
3811 contexts.\n\ | 3811 contexts.\n\ |
3812 \n\ | 3812 \n\ |
3813 The default value of @code{warn_assign_as_truth_value} is 1.\n\ | 3813 The default value of @code{warn_assign_as_truth_value} is 1.\n\ |
3814 @end defvr"); | 3814 @end defvr"); |
3815 | 3815 |
3816 DEFVAR (warn_function_name_clash, 1.0, warn_function_name_clash, | 3816 DEFVAR (warn_function_name_clash, true, warn_function_name_clash, |
3817 "-*- texinfo -*-\n\ | 3817 "-*- texinfo -*-\n\ |
3818 @defvr {Built-in Variable} warn_function_name_clash\n\ | 3818 @defvr {Built-in Variable} warn_function_name_clash\n\ |
3819 If the value of @code{warn_function_name_clash} is nonzero, a warning is\n\ | 3819 If the value of @code{warn_function_name_clash} is nonzero, a warning is\n\ |
3820 issued when Octave finds that the name of a function defined in a\n\ | 3820 issued when Octave finds that the name of a function defined in a\n\ |
3821 function file differs from the name of the file. (If the names\n\ | 3821 function file differs from the name of the file. (If the names\n\ |
3822 disagree, the name declared inside the file is ignored.) If the value\n\ | 3822 disagree, the name declared inside the file is ignored.) If the value\n\ |
3823 is 0, the warning is omitted. The default value is 1.\n\ | 3823 is 0, the warning is omitted. The default value is 1.\n\ |
3824 @end defvr"); | 3824 @end defvr"); |
3825 | 3825 |
3826 DEFVAR (warn_future_time_stamp, 1.0, warn_future_time_stamp, | 3826 DEFVAR (warn_future_time_stamp, true, warn_future_time_stamp, |
3827 "-*- texinfo -*-\n\ | 3827 "-*- texinfo -*-\n\ |
3828 @defvr {Built-in Variable} warn_future_time_stamp\n\ | 3828 @defvr {Built-in Variable} warn_future_time_stamp\n\ |
3829 If the value of this variable is nonzero, Octave will print a warning\n\ | 3829 If the value of this variable is nonzero, Octave will print a warning\n\ |
3830 if it finds a function file with a time stamp that is in the future.\n\ | 3830 if it finds a function file with a time stamp that is in the future.\n\ |
3831 @end defvr"); | 3831 @end defvr"); |
3832 | 3832 |
3833 DEFVAR (warn_missing_semicolon, 0.0, warn_missing_semicolon, | 3833 DEFVAR (warn_missing_semicolon, false, warn_missing_semicolon, |
3834 "-*- texinfo -*-\n\ | 3834 "-*- texinfo -*-\n\ |
3835 @defvr {Built-in Variable} warn_missing_semicolon\n\ | 3835 @defvr {Built-in Variable} warn_missing_semicolon\n\ |
3836 If the value of this variable is nonzero, Octave will warn when\n\ | 3836 If the value of this variable is nonzero, Octave will warn when\n\ |
3837 statements in function definitions don't end in semicolons. The default\n\ | 3837 statements in function definitions don't end in semicolons. The default\n\ |
3838 value is 0.\n\ | 3838 value is 0.\n\ |
3839 @end defvr"); | 3839 @end defvr"); |
3840 | 3840 |
3841 DEFVAR (warn_precedence_change, 1.0, warn_precedence_change, | 3841 DEFVAR (warn_precedence_change, true, warn_precedence_change, |
3842 "-*- texinfo -*-\n\ | 3842 "-*- texinfo -*-\n\ |
3843 @defvr {Built-in Variable} warn_precedence_change\n\ | 3843 @defvr {Built-in Variable} warn_precedence_change\n\ |
3844 If the value of this variable is nonzero, Octave will warn about\n\ | 3844 If the value of this variable is nonzero, Octave will warn about\n\ |
3845 possible changes in the meaning of some code due to changes in\n\ | 3845 possible changes in the meaning of some code due to changes in\n\ |
3846 precedence for some operators. Precedence changes have typically\n\ | 3846 precedence for some operators. Precedence changes have typically\n\ |
3847 been made for Matlab compatibility. The default value is 1.\n\ | 3847 been made for Matlab compatibility. The default value is 1.\n\ |
3848 @end defvr"); | 3848 @end defvr"); |
3849 | 3849 |
3850 DEFVAR (warn_variable_switch_label, 0.0, warn_variable_switch_label, | 3850 DEFVAR (warn_variable_switch_label, false, warn_variable_switch_label, |
3851 "-*- texinfo -*-\n\ | 3851 "-*- texinfo -*-\n\ |
3852 @defvr {Built-in Variable} warn_variable_switch_label\n\ | 3852 @defvr {Built-in Variable} warn_variable_switch_label\n\ |
3853 If the value of this variable is nonzero, Octave will print a warning if\n\ | 3853 If the value of this variable is nonzero, Octave will print a warning if\n\ |
3854 a switch label is not a constant or constant expression\n\ | 3854 a switch label is not a constant or constant expression\n\ |
3855 @end defvr"); | 3855 @end defvr"); |