Mercurial > jwe > octave
comparison src/variables.cc @ 1162:c210c5a25a48
[project @ 1995-02-27 17:36:16 by jwe]
author | jwe |
---|---|
date | Mon, 27 Feb 1995 17:38:57 +0000 |
parents | 0326a802cd5c |
children | b6360f2d4fa6 |
comparison
equal
deleted
inserted
replaced
1161:0326a802cd5c | 1162:c210c5a25a48 |
---|---|
1403 tmp = new tree_constant (nargout); | 1403 tmp = new tree_constant (nargout); |
1404 sr->define (tmp); | 1404 sr->define (tmp); |
1405 } | 1405 } |
1406 #endif | 1406 #endif |
1407 | 1407 |
1408 void | |
1409 bind_ans (const tree_constant& val, int print) | |
1410 { | |
1411 static symbol_record *sr = global_sym_tab->lookup ("ans", 1, 0); | |
1412 static tree_identifier ans_id (sr); | |
1413 | |
1414 tree_constant *tmp = new tree_constant (val); | |
1415 | |
1416 tree_simple_assignment_expression tmp_ass (&ans_id, tmp, 1, 1); | |
1417 | |
1418 tmp_ass.eval (print); | |
1419 } | |
1420 | |
1408 // Give a global variable a definition. This will insert the symbol | 1421 // Give a global variable a definition. This will insert the symbol |
1409 // in the global table if necessary. | 1422 // in the global table if necessary. |
1410 | 1423 |
1411 // How is this different than install_builtin_variable? Are both | 1424 // How is this different than install_builtin_variable? Are both |
1412 // functions needed? | 1425 // functions needed? |