Let's explore one of RINPn's advanced features on this page: script execution.
RINPn can execute scripts written in "Vnano" to perform procedural, algorithmic, or other complex calculations.
Vnano is a compact scripting engine and language designed for embedded use in applications. It features a simple C-like syntax. For more details on the syntax of Vnano, visit the "Features of the Vnano as a Language" page on the Vnano Official Website.
To create a Vnano script, you don't need any development environments such as compilers. Simply create a text file with the ".vnano" extension and write your code within.
An example script, "Example.vnano," is included in the RINPn folder. This script calculates the numerical integration of cos(x) from 0 to 1:
For a detailed explanation of the code above, visit: https://www.vcssl.org/en-us/code/archive/0001/7800-vnano-integral-output/.
To execute a script in GUI mode, there are two methods:
Choose the method that you prefer.
For example, to execute the "Example.vnano" script mentioned earlier:
As shown above, the output value from the script will be displayed in the "OUTPUT" text field. The output "0.8414709848" closely matches the theoretical value of sin(1), which is the integration result of cos(x) from 0 to 1, confirming that the script has executed correctly.
Additionally, if you are using Microsoft Windows, you can hold down the Shift key and right-click the script file to copy its path from the context menu. This is especially handy when you need to enter the path of the script file into the INPUT text field of RINPn.
Similar to GUI mode, you can execute a script in CUI mode by entering the name or the path of the script file.
For executing a script file in the current directory, pass only name of the script file to the "rinpn" command:
If the script file is in a different directory than the current one, you can specify the relative file path instead of just the file name:
Additionally, if necessary, you can specify the absolute file path as follows:
When processing a script is particularly demanding, you might find it beneficial to increase the optimization level specified in "Settings.txt" under "acceleratorOptimizationLevel" to enhance processing speed.
While the processing speed at an optimization level of 0 is generally sufficient for standard calculator software use, and hence the default level is set to 0, you might need a higher setting if you frequently execute complex numerical calculations on RINPn.
While you can create scripts from scratch, the code archive on the official VCSSL/Vnano website can also be a valuable resource:
This archive offers a variety of useful scripts, complete with commentary articles that explain the algorithms, background knowledge, and more.
Solve The Lorenz Equations Numerically |
|
![]() |
This script solves the Lorenz equations and outputs data to plot the solution curve, famously known as the "Lorenz Attractor," on a 3D graph. |
Output Data of Numerical Integration For Plotting Graph |
|
![]() |
An example script that computes integrated values numerically and outputs data for graph plotting. |
Compute Integral Value Numerically |
|
![]() |
This script calculates integral values using the rectangular method, trapezoidal method, and Simpson's rule, suitable for numerical integration. |