Mercurial > hg > octave-lyh
changeset 2959:5d1b71cd39f7
[project @ 1997-05-11 22:53:12 by jwe]
author | jwe |
---|---|
date | Sun, 11 May 1997 22:53:13 +0000 |
parents | da62d3b91fa3 |
children | 194b50e4725b |
files | src/pt-id.cc src/pt-id.h src/pt-misc.cc |
diffstat | 3 files changed, 4 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-id.cc +++ b/src/pt-id.cc @@ -53,26 +53,12 @@ } tree_identifier * -tree_identifier::define (octave_symbol *s, unsigned int sym_type) -{ - int status = sym->define (s, sym_type); - return status ? this : 0; -} - -tree_identifier * tree_identifier::define (octave_function *f, unsigned int sym_type) { int status = sym->define (f, sym_type); return status ? this : 0; } -tree_identifier * -tree_identifier::define (const octave_value& v) -{ - int status = sym->define (v); - return status ? this : 0; -} - void tree_identifier::document (const string& s) {
--- a/src/pt-id.h +++ b/src/pt-id.h @@ -63,12 +63,8 @@ string name (void) const; - tree_identifier *define (octave_symbol *s, unsigned int sym_type); - tree_identifier *define (octave_function *f, unsigned int sym_type); - tree_identifier *define (const octave_value& v); - void document (const string& s); bool is_defined (void);
--- a/src/pt-misc.cc +++ b/src/pt-misc.cc @@ -388,6 +388,8 @@ { tree_identifier *elt = this->operator () (p); + octave_variable_reference ref = elt->reference (); + if (i < nargin) { if (args(i).is_defined () && args(i).is_magic_colon ()) @@ -396,10 +398,10 @@ return; } - elt->define (args(i)); + ref.assign (octave_value::asn_eq, args(i)); } else - elt->define (octave_value ()); + ref.assign (octave_value::asn_eq, octave_value ()); next (p); }