Mercurial > octave-nkf
comparison src/tc-rep.cc @ 961:b0bb56a7ddcc
[project @ 1994-12-09 05:19:59 by jwe]
author | jwe |
---|---|
date | Fri, 09 Dec 1994 05:19:59 +0000 |
parents | 708827b941b4 |
children | 3611f5b12826 |
comparison
equal
deleted
inserted
replaced
960:a2545afe2093 | 961:b0bb56a7ddcc |
---|---|
1665 TC_REP::print (void) | 1665 TC_REP::print (void) |
1666 { | 1666 { |
1667 if (error_state) | 1667 if (error_state) |
1668 return; | 1668 return; |
1669 | 1669 |
1670 if (print) | 1670 ostrstream output_buf; |
1671 { | 1671 |
1672 ostrstream output_buf; | 1672 switch (type_tag) |
1673 | 1673 { |
1674 switch (type_tag) | 1674 case scalar_constant: |
1675 { | 1675 octave_print_internal (output_buf, scalar); |
1676 case scalar_constant: | 1676 break; |
1677 octave_print_internal (output_buf, scalar); | 1677 |
1678 break; | 1678 case matrix_constant: |
1679 | 1679 octave_print_internal (output_buf, *matrix); |
1680 case matrix_constant: | 1680 break; |
1681 octave_print_internal (output_buf, *matrix); | 1681 |
1682 break; | 1682 case complex_scalar_constant: |
1683 | 1683 octave_print_internal (output_buf, *complex_scalar); |
1684 case complex_scalar_constant: | 1684 break; |
1685 octave_print_internal (output_buf, *complex_scalar); | 1685 |
1686 break; | 1686 case complex_matrix_constant: |
1687 | 1687 octave_print_internal (output_buf, *complex_matrix); |
1688 case complex_matrix_constant: | 1688 break; |
1689 octave_print_internal (output_buf, *complex_matrix); | 1689 |
1690 break; | 1690 case string_constant: |
1691 | 1691 output_buf << string << "\n"; |
1692 case string_constant: | 1692 break; |
1693 output_buf << string << "\n"; | 1693 |
1694 break; | 1694 case range_constant: |
1695 | 1695 octave_print_internal (output_buf, *range); |
1696 case range_constant: | 1696 break; |
1697 octave_print_internal (output_buf, *range); | 1697 |
1698 break; | 1698 case map_constant: |
1699 | 1699 { |
1700 case map_constant: | 1700 output_buf << "<structure"; |
1701 int first = 1; | |
1702 for (Pix p = a_map->first (); p != 0; a_map->next (p)) | |
1701 { | 1703 { |
1702 output_buf << "<structure"; | 1704 if (first) |
1703 int first = 1; | |
1704 for (Pix p = a_map->first (); p != 0; a_map->next (p)) | |
1705 { | 1705 { |
1706 if (first) | 1706 output_buf << ":"; |
1707 { | 1707 first = 0; |
1708 output_buf << ":"; | |
1709 first = 0; | |
1710 } | |
1711 output_buf << " " << a_map->key (p); | |
1712 } | 1708 } |
1713 output_buf << ">\n"; | 1709 output_buf << " " << a_map->key (p); |
1714 } | 1710 } |
1715 break; | 1711 output_buf << ">\n"; |
1716 | 1712 } |
1717 case unknown_constant: | 1713 break; |
1718 case magic_colon: | 1714 |
1719 case all_va_args: | 1715 case unknown_constant: |
1720 panic_impossible (); | 1716 case magic_colon: |
1721 break; | 1717 case all_va_args: |
1722 } | 1718 panic_impossible (); |
1723 | 1719 break; |
1724 output_buf << ends; | 1720 } |
1725 maybe_page_output (output_buf); | 1721 |
1726 } | 1722 output_buf << ends; |
1723 maybe_page_output (output_buf); | |
1727 } | 1724 } |
1728 | 1725 |
1729 void | 1726 void |
1730 TC_REP::print_code (ostream& os) | 1727 TC_REP::print_code (ostream& os) |
1731 { | 1728 { |