read_datablock() reads any comment block of data embedded in the currently
running or edited script or in a given file.
Such an all-in-one script.sce file contains
* Scilab instructions, usually at the head of the script.sce file
* multiline comment blocks /* ... */ containing data that you wish
to read and use in the instructions.
This solution is very portable:
* Data do not need to be stored in any separate external files. Thus, the
script.sce file can be distributed as is to work. No need to build a zip archive
bundling the script and data files together.
* There is no path of external data files to manage in the script. You
don't even have to provide the path of your script.sce file to read the
* Processing instructions and (possibly bulky) data can be clearly separated,
remaining in the same file. This avoids obfuscating the code with data.
* The script.sce file can be printed out in one go, to document your work.
User manual (PDF)