Question: Why is text output to a file not working (Linux)?


I am fairly new to Maple and trying to figure out how to output text to a file, but nothing seems to be working. I would like to generate code files for Julia using Maple expressions.

I am in worksheet mode, using a 'code edit' region. If I do:

jlfile := fopen("./juliafunc.jl",WRITE,TEXT);

then the file is created, as intended. However, neither of the following commands seem to write any text to the file:

writeline(jlfile,"This is a test.");
fprintf(jlfile,"This is a test.\n");

(these are similar to the examples in the dcumentation)

Is there something I am doing wrong? I am using Maple 2020 on Linux.

Please Wait...