home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!bhattas
- From: bhattas@athena.mit.edu (Saurav D Bhatta)
- Subject: Maple question
- Message-ID: <1992Aug27.160913.14137@athena.mit.edu>
- Keywords: output file, C.
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: m37-332-5.mit.edu
- Organization: Massachusetts Institute of Technology
- Date: Thu, 27 Aug 1992 16:09:13 GMT
- Lines: 28
-
- i am writing a procedure that generates symbolic expressions which i want to use
- in a C program. i want to output the expressions to a file. so my question is
- basically this: how would i output stuff to a file in a format readable by a C
- program.
-
- i tried the following methods:
-
- 1) > C(expression,filename = `test.out`);
- the problem with this was that every time i used this command, the file was
- overwritten. since my procedure is going to generate a lot of different
- expressions which i want to output to the file, i definitely do not want the file
- to be overwirtten every time i write out a new expression (want an append mode);
-
- 2) > open(`test.out`);
- > write(C(expression));
- > close();
- unfortulately here i never got past the write(C(expression)) statement, since the
- computer hung up on me after that.
-
- 3) > writeto(`test.out`);
- > C(expression);
- here the C expression was written to the terminal instead of the file.
-
- thanks.
-
- saurav
- (bhattas@presto.mit.edu)
-
-