Mercurial > hg > octave-lyh
changeset 264:bfda7a46e837
[project @ 1994-01-03 22:04:26 by jwe]
author | jwe |
---|---|
date | Mon, 03 Jan 1994 22:04:26 +0000 |
parents | 1ef675458060 |
children | 221a5fa8bf01 |
files | src/symtab.cc |
diffstat | 1 files changed, 8 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/symtab.cc +++ b/src/symtab.cc @@ -181,10 +181,7 @@ int symbol_def::save (ostream& os, int mark_as_global) { - if (definition) - return definition->save (os, mark_as_global); - else - return 0; + return definition->save (os, mark_as_global); } int @@ -531,28 +528,23 @@ int symbol_record::save (ostream& os, int mark_as_global = 0) { - int status = 0; + int status = -1; // This is a kludge, but hey, it doesn't make sense to save them // anyway, does it? Even if it did, we would just have trouble trying // to read NaN and Inf on lots of systems anyway... +// +// Should we also save the help string? Maybe someday. if (is_read_only ()) - { - warning ("save: sorry, can't save read-only variable `%s'", nm); - status = -1; - } + warning ("save: sorry, can't save read-only variable `%s'", nm); else if (is_function ()) - { - warning ("save: sorry, can't save function `%s'", nm); - status = -1; - } + warning ("save: sorry, can't save function `%s'", nm); + else if (! is_defined ()) + warning ("save: sorry, can't save undefined variable `%s'", nm); else { -// Should we also save the help string? Maybe someday. - os << "# name: " << nm << "\n"; - status = definition->save (os, mark_as_global); }