RINEARN
HOMEINFOSOFTTECHAICONTACT
RINEARN > English Top > RINPn > User Guide
[ Prev | Index | Next ]
Japanese English

Step 3 - How to Execute Scripts

Let's explore one of RINPn's advanced features on this page: script execution.

» Ask the AI for help (ChatGPT account required)
- Table of Contents -
  • What is the Vnano?
  • Example Script
  • How to Execute a Script in GUI mode
  • How to Execute a Script in CUI mode
  • About Optimization Levels: When Processing of a Script Is Heavy ...
  • Get New Scripts from the Code Archive

Sponsored Link


RINPn can execute scripts written in "Vnano" to perform procedural, algorithmic, or other complex calculations.

What is Vnano?

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.

Example Script

An example script, "Example.vnano," is included in the RINPn folder. This script calculates the numerical integration of cos(x) from 0 to 1:

(The content of "Example.vnano")

// Integration parameters
double A = 0.0;
double B = 1.0;
int N = 100000;

// Integrant function
double f(double x) {
    return cos(x);
}

// Perform integration
double delta = (B - A) / N;
double value = 0.0;
for(int i=0; i<N; ++i) {
    double x = A + i * delta;
    value += ( f(x) + f(x+delta) + 4.0 * f(x+delta/2.0) ) * delta / 6.0;
}

output(value);

For a detailed explanation of the code above, visit: https://www.vcssl.org/en-us/code/archive/0001/7800-vnano-integral-output/.

How to Execute a Script in GUI mode

To execute a script in GUI mode, there are two methods:

  • Method 1: Click the "Script" button on the window and select the script file you wish to execute.
  • Method 2: Enter the name or path of the script file into the "INPUT" text field, then press the Enter key or click the "=" button to execute it.

Choose the method that you prefer.

For example, to execute the "Example.vnano" script mentioned earlier:

INPUT:
Example.vnano

OUTPUT:
0.8414709848

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.

How to Execute a Script in CUI mode

Similar to GUI mode, you can execute a script in CUI mode by entering the name or the path of the script file.

Assuming the "cmd" folder of RINPn is added to your PC's "PATH" environment variable (» More details), and the "rinpn" command is available, here's how to execute a script file in the current directory:

For executing a script file in the current directory, pass only name of the script file to the "rinpn" command:

cd (the directory where the script file is located)

rinpn Example.vnano
(Result) 0.8414709848

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:

rinpn ../Example.vnano     # Execute a script in the parent directory
rinpn ./example/Example.vnano     # Execute a script in the "example" directory

Additionally, if necessary, you can specify the absolute file path as follows:

rinpn "C:\...\Example.vnano"     # For Microsoft Windows
rinpn "/home/.../Example.vnano"     # For Linux, etc.

About Optimization Levels

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.

Get New Scripts from the Code Archive

While you can create scripts from scratch, the code archive on the official VCSSL/Vnano website can also be a valuable resource:

Code Archive » Vnano
https://www.vcssl.org/en-us/code/#vnano

This archive offers a variety of useful scripts, complete with commentary articles that explain the algorithms, background knowledge, and more.

- Examples of Scripts Available in the Code Archive -
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.


Sponsored Link



Japanese English
[ Prev | Index | Next ]
RINEARN > English Top > RINPn > User Guide
  • Introduction - Overview of RINPn and How to Get Started
  • Step 1 - Using RINPn in GUI Mode
  • Step 2 - Using RINPn in CUI Mode (Command-Line Terminal)
  • Step 3 - How to Execute Scripts
  • Step 4 - How to Add Functions/Variables by Scripts (Library Scripts)
  • Step 5 - Implement Functions/Variables in Java™ (Plug-in Development)
  • Step 6 - How to Embed into Other Software
  • Appendix - List of Built-in Functions/Variables
Index of this category
RINEARN > English Top > RINPn > User Guide
[ Prev | Index | Next ]
  • Introduction - Overview of RINPn and How to Get Started
  • Step 1 - Using RINPn in GUI Mode
  • Step 2 - Using RINPn in CUI Mode (Command-Line Terminal)
  • Step 3 - How to Execute Scripts
  • Step 4 - How to Add Functions/Variables by Scripts (Library Scripts)
  • Step 5 - Implement Functions/Variables in Java™ (Plug-in Development)
  • Step 6 - How to Embed into Other Software
  • Appendix - List of Built-in Functions/Variables
News

VCSSL 3.4.52 Released: Enhanced Integration with External Programs and More
2025-05-25 - This update introduces enhancements to the external program integration features (e.g., for running C-language executables). Several other improvements and fixes are also included. Details inside.

Released: Latest Version of VCSSL with Fixes for Behavioral Changes on Java 24
2025-04-22 - VCSSL 3.4.50 released with a fix for a subtle behavioral change in absolute path resolution on network drives, introduced in Java 24. Details inside.

Released the Latest Versions of RINEARN Graph and VCSSL - Now Supporting Customizable Tick Positions and Labels!
2024-11-24 - Starting with this update, a new "MANUAL" tick mode is now supported, allowing users to freely specify the positions and labels of ticks on the graph. We'll explain the details and how to use it.

Released Exevalator 2.2: Now Compatible with TypeScript and Usable in Web Browsers
2024-10-22 - The open-source expression evaluation library, Exevalator, has been updated to version 2.2. It now supports TypeScript and can be used for evaluating expressions directly in web browsers. Explains the details.

Behind the Scenes of Creating an Assistant AI (Part 1: Fundamental Knowledge)
2024-10-07 - The first part of a series on how to create an Assistant AI. In this article, we introduce the essential knowledge you need to grasp before building an Assistant AI. What exactly is an LLM-based AI? What is RAG? And more.

Launching an Assistant AI to Support Software Usage!
2024-09-20 - We've launched an Assistant AI that answers questions about how to use RINEARN software and helps with certain tasks. Anyone with a ChatGPT account can use it for free. We'll explain how to use it.

Software Updates: Command Expansion in RINEARN Graph, and English Support in VCSSL
2024-02-05 - We updated our apps. This updates include "Enhancing the Command-Line Features of RINEARN Graph" and "Adding English Support to VCSSL." Dives into each of them!

Inside the Repetitive Execution Speedup Impremented in Vnano Ver.1.1
2024-01-17 - Delves into the update in Vnano 1.1 from a developer's viewpoint, providing detailed insights into the specific improvements made to the internal structure of the script engine.

» View More Articles
See Our News
on Twitter !
RINEARN Official Website | Top Page | Privacy Policy |
This website uses cookies for serving ads and analyzing traffic data. By continuing to use this website, you agree to our privacy policy.
This website is managed by RINEARN. All rights to the contents of this website are owned by RINEARN and its owner.
Copyright(C) RINEARN 2009 - 2025 All rights reserved.