Changeset 2289 in Sophya
- Timestamp:
- Dec 5, 2002, 3:27:27 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r2275 r2289 779 779 else if ((kw == "mtxfrascii") || (kw == "vecfrascii") ) { 780 780 if(tokens.size() < 2) { 781 cout<<"Usage: mtxfrascii/vecfrascii mtx/vec_name file_name "<<endl;781 cout<<"Usage: mtxfrascii/vecfrascii mtx/vec_name file_name [CommLine Separator]"<<endl; 782 782 return(0); 783 783 } … … 792 792 ifstream is(tokens[1].c_str()); 793 793 sa_size_t nr, nc; 794 char clm = '#'; 795 string sep = " \t"; 796 if (tokens.size()>2) clm = tokens[2][0]; 797 if (tokens.size()>3) sep = tokens[3]; 794 798 if (kw == "mtxfrascii") { 795 mtx.ReadASCII(is, nr, nc );799 mtx.ReadASCII(is, nr, nc, clm, sep.c_str()); 796 800 mObjMgr->AddObj(mtx, tokens[0]); 797 801 cout << "mtxfrascii: TMatrix<r_8> " << tokens[0] << " read from file " … … 799 803 } 800 804 else { 801 vec.ReadASCII(is, nr, nc );805 vec.ReadASCII(is, nr, nc, clm, sep.c_str()); 802 806 mObjMgr->AddObj(vec, tokens[0]); 803 807 cout << "vecfrascii: TVector<r_8> " << tokens[0] << " read from file " … … 1257 1261 kw = "mtxfrascii"; 1258 1262 usage = "Reads a matrix from an ASCII file (TMatrix<r_8>)"; 1259 usage += "\n Usage: mtxfrascii mtx_name file_name ";1263 usage += "\n Usage: mtxfrascii mtx_name file_name [CommChar Separator]"; 1260 1264 usage += "\n Related commands: arrtoascii vecfrascii ntfrascii "; 1261 1265 mpiac->RegisterCommand(kw, usage, this, "FileIO"); … … 1263 1267 usage = "Reads a vector from an ASCII file (TVector<r_8>)"; 1264 1268 usage += "\n Usage: vecfrascii vec_name file_name"; 1265 usage += "\n Related commands: arrtoascii mtxfrascii ntfrascii ";1269 usage += "\n Related commands: arrtoascii mtxfrascii ntfrascii [CommChar Separator]"; 1266 1270 mpiac->RegisterCommand(kw, usage, this, "FileIO"); 1267 1271 kw = "arrtoascii";
Note:
See TracChangeset
for help on using the changeset viewer.