Modular programming with scriptets
A scriptet is the higher level in modular programming. A scriptet may be included directly into a program and its data may be shared between several programs.What is a scriptet?
Scriptet means for "script in a net", this is another innovative feature of the Scriptol programming language.A scriptet is a standalone program that can be used also by another program.
A set of scriptets may share their resources: the code and the data.
In a network of scriptets, you can run any program, each one has a main function and each one may have a different kind of processing on same data.
Why use scriptets?
Scriptet are useful for:
- Debugging: you can test the functions of a program, with "main" function dedicated to that, and use them then in other programs.
- Dynamic programming: scriptets are components. No need to split programs into several files and make libraries, just include the files that hold the function or data you need.
- XML processing: describe an XML document into a scriptet, and use the document into other ones.
How to make scriptets?
There is nothing special to do.
You have just to include each program into other ones with the "include"
statement, as usually.
The compiler keeps only the "main" fonction of the file given
at compile command, it disables others.