comparison src/pt-mat.cc @ 5794:1138ced03f14

[project @ 2006-05-08 20:23:04 by jwe]
author jwe
date Mon, 08 May 2006 20:23:07 +0000
parents faafc2d98b8d
children 2a6cb4ed8f1e
comparison
equal deleted inserted replaced
5793:395382df0d8a 5794:1138ced03f14
937 tree_matrix::accept (tree_walker& tw) 937 tree_matrix::accept (tree_walker& tw)
938 { 938 {
939 tw.visit_matrix (*this); 939 tw.visit_matrix (*this);
940 } 940 }
941 941
942 static int 942 DEFUN (string_fill_char, args, nargout,
943 string_fill_char (void) 943 "-*- texinfo -*-\n\
944 { 944 @deftypefn {Built-in Function} {@var{val} =} string_fill_char ()\n\
945 int status = 0; 945 @deftypefnx {Built-in Function} {@var{old_val} =} string_fill_char (@var{new_val})\n\
946 946 Query or set the internal variable used to pad all rows of a character\n\
947 std::string s = builtin_string_variable ("string_fill_char"); 947 matrix to the same length. It must be a single character. The default\n\
948 948 value is @code{\" \"} (a single space). For example,\n\
949 switch (s.length ())
950 {
951 case 1:
952 Vstring_fill_char = s[0];
953 break;
954
955 case 0:
956 Vstring_fill_char = '\0';
957 break;
958
959 default:
960 warning ("string_fill_char must be a single character");
961 status = -1;
962 break;
963 }
964
965 return status;
966 }
967
968 void
969 symbols_of_pt_mat (void)
970 {
971 DEFVAR (string_fill_char, " ", string_fill_char,
972 "-*- texinfo -*-\n\
973 @defvr {Built-in Variable} string_fill_char\n\
974 The value of this variable is used to pad all strings in a string matrix\n\
975 to the same length. It should be a single character. The default value\n\
976 is @code{\" \"} (a single space). For example,\n\
977 \n\ 949 \n\
978 @example\n\ 950 @example\n\
979 @group\n\ 951 @group\n\
980 string_fill_char = \"X\";\n\ 952 string_fill_char (\"X\");\n\
981 [ \"these\"; \"are\"; \"strings\" ]\n\ 953 [ \"these\"; \"are\"; \"strings\" ]\n\
982 @result{} \"theseXX\"\n\ 954 @result{} \"theseXX\"\n\
983 \"areXXXX\"\n\ 955 \"areXXXX\"\n\
984 \"strings\"\n\ 956 \"strings\"\n\
985 @end group\n\ 957 @end group\n\
986 @end example\n\ 958 @end example\n\
987 @end defvr"); 959 @end deftypefn")
960 {
961 return SET_INTERNAL_VARIABLE (string_fill_char);
988 } 962 }
989 963
990 /* 964 /*
991 ;;; Local Variables: *** 965 ;;; Local Variables: ***
992 ;;; mode: C++ *** 966 ;;; mode: C++ ***