1/* setup */
2kill(all);
3reset ();
4sanitize (s) := ssubst ("", ")", ssubst ("", "(", ssubst ("_", " ", s)));
5set_random_state (make_random_state (true)) $
6myfile : sconcat (maxima_tempdir, "/maxima-", sanitize (build_info()@lisp_name), "-", 1000 + random (9000), ".log");
7/* begin writefile */
8writefile (myfile);
9/* 2d output */
10foo : expand ((x - y)^5) / expand ((a - b)^7);
11/* describe */
12?? write
131
14/* different forms of printing */
15grind (foo);
16print ("print: foo = ", foo);
17printf (true, "printf: foo = ~a~%", foo);
18/* 1d output */
19display2d : false;
20foo;
21/* end writefile */
22closefile ();
23reset (display2d);
24print ("A message which shouldn't appear in the log file.");
25/* begin appendfile */
26appendfile (myfile);
27/* 2d output */
28foo : expand ((x - y)^5) / expand ((a - b)^7);
29/* describe */
30?? write
311
32/* different forms of printing */
33grind (foo);
34print ("print: foo = ", foo);
35printf (true, "printf: foo = ~a~%", foo);
36/* 1d output */
37display2d : false;
38foo;
39/* end appendfile */
40closefile ();
41print ("Another non-logged message.");
42