comparison src/variables.cc @ 4342:813effe14ee1

[project @ 2003-02-20 08:35:55 by jwe]
author jwe
date Thu, 20 Feb 2003 08:35:55 +0000
parents d53c33d93440
children 4e23bfdd6172
comparison
equal deleted inserted replaced
4341:de9b588bf002 4342:813effe14ee1
786 symbol_record *sym_rec = curr_sym_tab->lookup (nm, true); 786 symbol_record *sym_rec = curr_sym_tab->lookup (nm, true);
787 787
788 lookup (sym_rec, exec_script); 788 lookup (sym_rec, exec_script);
789 789
790 return sym_rec; 790 return sym_rec;
791 }
792
793 octave_function *
794 lookup_function (const std::string& nm)
795 {
796 octave_function *retval = 0;
797
798 symbol_record *sr = 0;
799
800 if (curr_parent_function)
801 {
802 std::string parent = curr_parent_function->function_name ();
803
804 sr = fbi_sym_tab->lookup (parent + ":" + nm);
805 }
806
807 if (! sr || ! sr->is_function ())
808 {
809 sr = fbi_sym_tab->lookup (nm, true);
810
811 if (sr && ! sr->is_function ())
812 load_fcn_from_file (sr, false);
813 }
814
815 if (sr)
816 {
817 octave_value v = sr->def ();
818
819 if (v.is_function ())
820 retval = v.function_value ();
821 }
822
823 return retval;
791 } 824 }
792 825
793 octave_value 826 octave_value
794 get_global_value (const std::string& nm) 827 get_global_value (const std::string& nm)
795 { 828 {