Changeset a4cef35 in tol
- Timestamp:
- Jul 10, 2011, 12:39:30 PM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 8683c44
- Parents:
- d445cda
- File:
-
- 1 edited
-
tol/bmath/mathobjects/dat.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/bmath/mathobjects/dat.cpp
rd445cda ra4cef35 1119 1119 //-------------------------------------------------------------------- 1120 1120 { 1121 BText txt, bformat_out;1122 char format_in[80], format_out[80], str_in[1024], str_out[1024];1123 1121 if(Known()) 1124 1122 { 1125 int i,j; 1126 setlocale( LC_NUMERIC, TOL_lc_numeric()); 1127 strcpy(format_in, format.String()); 1128 for(i=0, j=0; format_in[i]!='\0'; i++) 1129 { 1130 if(format_in[i]!='\'') 1131 { format_out[j++] = format_in[i]; } 1123 if ( IsFinite() ) { 1124 BText txt, bformat_out; 1125 char format_in[80], format_out[80], str_in[1024], str_out[1024]; 1126 int i,j; 1127 setlocale( LC_NUMERIC, TOL_lc_numeric()); 1128 strcpy(format_in, format.String()); 1129 for(i=0, j=0; format_in[i]!='\0'; i++) 1130 { 1131 if(format_in[i]!='\'') 1132 { format_out[j++] = format_in[i]; } 1133 } 1134 format_out[j++] = '\0'; 1135 bformat_out = format_out; 1136 //txt.Copy(Value(), format.String()); 1137 txt.Copy(Value(), bformat_out); 1138 strcpy(str_in, txt.Buffer()); 1139 markThousands(str_out, str_in); 1140 txt = str_out; 1141 setlocale( LC_NUMERIC, "C"); 1142 // if(Value()==floor(Value())) { txt.Copy(BInt(Value())); } 1143 return txt; 1144 } else if ( IsPosInf() ) { 1145 return "1/0"; 1146 } else if ( IsNegInf() ) { 1147 return "-1/0"; 1148 } else { 1149 return "?"; 1132 1150 } 1133 format_out[j++] = '\0'; 1134 bformat_out = format_out; 1135 //txt.Copy(Value(), format.String()); 1136 txt.Copy(Value(), bformat_out); 1137 strcpy(str_in, txt.Buffer()); 1138 markThousands(str_out, str_in); 1139 txt = str_out; 1140 setlocale( LC_NUMERIC, "C"); 1141 // if(Value()==floor(Value())) { txt.Copy(BInt(Value())); } 1142 } 1143 else { txt="?"; } 1144 return(txt); 1151 } 1152 else { return "?"; } 1145 1153 } 1146 1154
Note: See TracChangeset
for help on using the changeset viewer.
