Mercurial > octave
comparison src/pt-exp-base.cc @ 1211:ee2c6a67abe9
[project @ 1995-04-06 01:12:06 by jwe]
author | jwe |
---|---|
date | Thu, 06 Apr 1995 01:13:07 +0000 |
parents | 4f1bfa351b99 |
children | 7d7c3eaa1d3b |
comparison
equal
deleted
inserted
replaced
1210:dc7a13bed722 | 1211:ee2c6a67abe9 |
---|---|
118 print_constant (tree_constant& tc, char *name, int print_padding = 1) | 118 print_constant (tree_constant& tc, char *name, int print_padding = 1) |
119 { | 119 { |
120 int pad_after = 0; | 120 int pad_after = 0; |
121 if (user_pref.print_answer_id_name) | 121 if (user_pref.print_answer_id_name) |
122 { | 122 { |
123 if (print_as_scalar (tc)) | 123 if (print_as_scalar (tc) || print_as_structure (tc)) |
124 { | 124 { |
125 ostrstream output_buf; | 125 ostrstream output_buf; |
126 output_buf << name << " = " << ends; | 126 output_buf << name << " = " << ends; |
127 maybe_page_output (output_buf); | |
128 } | |
129 else if (print_as_structure (tc)) | |
130 { | |
131 ostrstream output_buf; | |
132 output_buf << name << " = {\n" << ends; | |
133 maybe_page_output (output_buf); | 127 maybe_page_output (output_buf); |
134 } | 128 } |
135 else | 129 else |
136 { | 130 { |
137 pad_after = 1; | 131 pad_after = 1; |
1933 } | 1927 } |
1934 } | 1928 } |
1935 } | 1929 } |
1936 } | 1930 } |
1937 | 1931 |
1938 if (! error_state && print && retval.is_defined () | 1932 if (! error_state && print && retval.is_defined ()) |
1939 && user_pref.print_answer_id_name) | |
1940 print_constant (retval, lhs->name ()); | 1933 print_constant (retval, lhs->name ()); |
1941 | 1934 |
1942 return retval; | 1935 return retval; |
1943 } | 1936 } |
1944 | 1937 |
2068 ostrstream output_buf; | 2061 ostrstream output_buf; |
2069 output_buf << "\n" << ends; | 2062 output_buf << "\n" << ends; |
2070 maybe_page_output (output_buf); | 2063 maybe_page_output (output_buf); |
2071 } | 2064 } |
2072 | 2065 |
2073 if (print && user_pref.print_answer_id_name) | 2066 if (print) |
2074 print_constant (results(i), lhs_expr->name (), 0); | 2067 print_constant (results(i), lhs_expr->name (), 0); |
2075 | 2068 |
2076 pad_after++; | 2069 pad_after++; |
2077 i++; | 2070 i++; |
2078 } | 2071 } |