comparison src/variables.cc @ 11558:1e4dfc7a9487

use .argn. to store argument names for inputname function
author John W. Eaton <jwe@octave.org>
date Mon, 17 Jan 2011 13:59:35 -0500
parents e582adc89d55
children 12df7854fa7c
comparison
equal deleted inserted replaced
11557:e9d72a3caa46 11558:1e4dfc7a9487
2543 2543
2544 // Call. 2544 // Call.
2545 feval (func_name, octave_value (name)); 2545 feval (func_name, octave_value (name));
2546 } 2546 }
2547 } 2547 }
2548
2549 DEFUN (__varval__, args, ,
2550 "-*- texinfo -*-\n\
2551 @deftypefn {Built-in Function} {} __varval__ (@var{name})\n\
2552 Undocumented internal function.\n\
2553 @end deftypefn")
2554 {
2555 octave_value retval;
2556
2557 if (args.length () == 1)
2558 {
2559 std::string name = args(0).string_value ();
2560
2561 if (! error_state)
2562 retval = symbol_table::varval (args(0).string_value ());
2563 else
2564 error ("__varval__: expecting argument to be variable name");
2565 }
2566 else
2567 print_usage ();
2568
2569 return retval;
2570 }