comparison libinterp/corefcn/pr-output.cc @ 18464:917f1af7d2e4

Additional format options for matlab compatibility (bug #41541). * pr-output.cc (set_format_style): added new condensed argument options to if/elseif option parsing tree.
author Markus Bergholz <markuman@gmail.com>
date Mon, 10 Feb 2014 18:49:28 +0100
parents e76d50d65278
children 5bd1ca29c5f0
comparison
equal deleted inserted replaced
18463:2d0afa04d103 18464:917f1af7d2e4
3666 else 3666 else
3667 init_format_state (); 3667 init_format_state ();
3668 3668
3669 set_output_prec_and_fw (5, 10); 3669 set_output_prec_and_fw (5, 10);
3670 } 3670 }
3671 else if (arg == "shorte")
3672 {
3673 init_format_state ();
3674 print_e = true;
3675 set_output_prec_and_fw (5, 10);
3676 }
3677 else if (arg == "shortE")
3678 {
3679 init_format_state ();
3680 print_e = true;
3681 print_big_e = true;
3682 set_output_prec_and_fw (5, 10);
3683 }
3684 else if (arg == "shortg")
3685 {
3686 init_format_state ();
3687 print_g = true;
3688 set_output_prec_and_fw (5, 10);
3689 }
3690 else if (arg == "shortG")
3691 {
3692 init_format_state ();
3693 print_g = true;
3694 print_big_e = true;
3695 set_output_prec_and_fw (5, 10);
3696 }
3697 else if (arg == "shortEng")
3698 {
3699 init_format_state ();
3700 print_eng = true;
3701 set_output_prec_and_fw (5, 10);
3702 }
3671 else if (arg == "long") 3703 else if (arg == "long")
3672 { 3704 {
3673 if (--argc > 0) 3705 if (--argc > 0)
3674 { 3706 {
3675 arg = argv[idx++]; 3707 arg = argv[idx++];
3711 else 3743 else
3712 init_format_state (); 3744 init_format_state ();
3713 3745
3714 set_output_prec_and_fw (15, 20); 3746 set_output_prec_and_fw (15, 20);
3715 } 3747 }
3748 else if (arg == "longe")
3749 {
3750 init_format_state ();
3751 print_e = true;
3752 set_output_prec_and_fw (15, 20);
3753 }
3754 else if (arg == "longE")
3755 {
3756 init_format_state ();
3757 print_e = true;
3758 print_big_e = true;
3759 set_output_prec_and_fw (15, 20);
3760 }
3761 else if (arg == "longg")
3762 {
3763 init_format_state ();
3764 print_g = true;
3765 set_output_prec_and_fw (15, 20);
3766 }
3767 else if (arg == "longG")
3768 {
3769 init_format_state ();
3770 print_g = true;
3771 print_big_e = true;
3772 set_output_prec_and_fw (15, 20);
3773 }
3774 else if (arg == "longEng")
3775 {
3776 init_format_state ();
3777 print_eng = true;
3778 set_output_prec_and_fw (15, 20);
3779 }
3716 else if (arg == "hex") 3780 else if (arg == "hex")
3717 { 3781 {
3718 init_format_state (); 3782 init_format_state ();
3719 hex_format = 1; 3783 hex_format = 1;
3720 } 3784 }