Question: why warning Warning, incomplete string; use " to end the string shows up using read(mpl) only?

I have a function inside a file called proc2.mpl

When I read the file from a worksheet using the command read("proc2.mpl"); I see warning messages

Warning, incomplete string;  use " to end the string
Warning, incomplete string;  use " to end the string

printed on the screen.  Now if I copy the same exact code and past it into the worksheet and invoke the function, I see no warning messages.

Why is that? Here is the content of "proc2.mpl"

process_file := proc()
  local str,fileName;


  fileName := "output.txt";
  
  str:="
   \\begin{align*}
     A =& B  \\\\ 
       =& 3
   \\end{align*}
  ";
	
  writebytes(fileName, str);
  close(fileName);

end proc:

Here is screen shot loading the function from worksheet

But now when I call it using process_file(); it works as expected.

Now here is screen shot with same code inside the worksheet itself. No warning messages show up when I call it.

And the above call also works as expected.

So I am now ignoring these warning messages since I also do not know what causes them.

Any ideas why they show up when the code is inside a .mpl file and not in the work sheet?

Maple 2017.3 on windows.

 

 

 

Please Wait...