Changeset 2287 in Sophya for trunk/SophyaPI/PIext/piacmd.cc


Ignore:
Timestamp:
Dec 5, 2002, 12:16:52 PM (23 years ago)
Author:
ansari
Message:

modifs cxxexecutor avec options declarevars + echo2file - Reza 5/12/02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/piacmd.cc

    r2285 r2287  
    431431usage += "  > rpneval varname RPNExpression # Reverse Polish Notation evaluation \n";
    432432usage += "  > echo string            # output string \n";
     433usage += "  > echo2file filename string # Append the string to the specified file \n";
    433434usage += "  > alias name string      # define a command alias \n";
    434435usage += "  > readstdin varname      # reads a line from stdin into $varname \n";
     
    15281529  cout << endl;
    15291530 }
     1531else if (kw == "echo2file") {
     1532  if (tokens.size() < 1) {
     1533    cout << "PIACmd::Interpret() Usage: echo2file filename [string ] " << endl; 
     1534    return(0);
     1535  }
     1536  ofstream ofs(tokens[0].c_str(), ios::app);
     1537  for (int ii=1; ii<tokens.size(); ii++)
     1538    ofs << tokens[ii] << " " ;
     1539  ofs << endl;
     1540 }
    15301541else if (kw == "readstdin") {
    15311542  if (tokens.size() < 1) { cout << "PIACmd::Interpret() Usage: readstdin varname" << endl;  return(0); }
Note: See TracChangeset for help on using the changeset viewer.