home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / sci / math / symbolic / 2276 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.4 KB  |  41 lines

  1. Newsgroups: sci.math.symbolic
  2. Path: sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!bhattas
  3. From: bhattas@athena.mit.edu (Saurav D Bhatta)
  4. Subject: Maple question
  5. Message-ID: <1992Aug27.160913.14137@athena.mit.edu>
  6. Keywords: output file, C.
  7. Sender: news@athena.mit.edu (News system)
  8. Nntp-Posting-Host: m37-332-5.mit.edu
  9. Organization: Massachusetts Institute of Technology
  10. Date: Thu, 27 Aug 1992 16:09:13 GMT
  11. Lines: 28
  12.  
  13. i am writing a procedure that generates symbolic expressions which i want to use
  14. in a C program. i want to output the expressions to a file. so my question is
  15. basically this: how would i output stuff to a file in a format readable by a C
  16. program.
  17.  
  18. i tried the following methods:
  19.  
  20. 1) > C(expression,filename = `test.out`);
  21. the problem with this was that every time i used this command, the file was
  22. overwritten. since my procedure is going to generate a lot of different
  23. expressions which i want to output to the file, i definitely do not want the file
  24. to be overwirtten every time i write out a new expression (want an append mode);
  25.  
  26. 2) > open(`test.out`);
  27.    > write(C(expression));
  28.    > close();
  29. unfortulately here i never got past the write(C(expression)) statement, since the
  30. computer hung up on me after that.
  31.  
  32. 3) > writeto(`test.out`);
  33.    > C(expression);
  34. here the C expression was written to the terminal instead of the file.
  35.  
  36. thanks.
  37.  
  38. saurav
  39. (bhattas@presto.mit.edu)
  40.  
  41.