Step 2 - How to Use in CUI Mode
(on the Command-Line Terminal)
In this section, Let's try to use another mode of the RINPn: CUI mode. In the CUI mode, you can take calculations on the command-line terminal, whithout launching the calculator window.
How to Calculate in CUI Mode (Without Any Settings)
To use the CUI mode without any additional settings, execute the "RINPn.jar" with passing an expression as a command-line argument as follows:
java -jar RINPn.jar "(1 + 2 ) / 3 - 4 + 5"
java -jar RINPn.jar "sqrt ( sin( PI / 2 ) + 1 )"
As the above, we can take the same calculation as the example we took in GUI mode, without launching the calculator window.
How to Calculate in CUI Mode (With The Path-Setting)
It may be hassle to input the above long command-line with setting the current directory to the folder of the RINPn every time. To make it easy, it is helpful to register the path of "cmd" folder of the RINPn to the environment variable "PATH" (or "Path") of your OS. If you do it, after then, wherever the current directory is, you can take calculations more simply by using "rinpn" command as follows:
rinpn "sqrt ( sin( PI / 2 ) + 1 )"
How to modify the environment variable PATH/Path depends on the OS you are using. For details, please search on the web with keywords "how to set path (+ the name OS you are using)" and so on. Please note that, if you deleted the current value of the environment variable "PATH"/"Path" by mistake, or if you modify it to invalid value, serious problems may occurred on your PC. Be careful when you are modifying it. If you have never modified it, and if you can ask to someone for helping/supervising you, we recommend to ask.
Also, on the Linux® and so on, an error message related with permissions may occur at the first time you use "rinpn" command. In that case, add a permission as follows:
chmod +x rinpn (or, if necessary: sudo chmod +x rinpn )
- Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- Microsoft Windows is either a registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
- Linux is a trademark of linus torvalds in the United States and/or other countries.
- Other names may be either a registered trademarks or trademarks of their respective owners.
- Introduction - Overview of the RINPn and Preparation to Use
- Step 1 - How to Use in GUI Mode (on the Calculator Window)
- Step 2 - How to Use in CUI Mode (on the 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