|Scilab Bag Of Tricks: The Scilab-2.5 IAQ (Infrequently Asked Questions)|
|Prev||Chapter 2. Common Pitfalls||Next|
The last line in a Scilab script is ignored if it is not terminated by a newline (^J on UNI* systems, but most of the time written in C-style \n). This is emphasized at several places in the official Scilab documentation, but it is so common to forget it especially when using emacs that we repeat it here. However, emacs can be told always to add a final newline by adding (setq require-final-newline t) to the startup-file, .emacs. See "Learning GNU Emacs" [cameron:1996], Table C-8.
Another weapon against this kind of syntax flaw, and a few other pesky things, is e.g. the Perl-script shown in Example 2-2, which fixes part of the format of a Scilab script.