Command line argumentsqxcalc.exe is the backend of QxCalculator, qxcg.exe. You can use the qxcalc.exe without the user interface(qxcg.exe), but not the other way around.Below is the help text, 'qxcalc.exe -h', of qxcalc.exe: ************************************* qxcalc - A scriptable calculator Version 59 http://qxcalc.sourceforge.net/ ************************************* -h help -v version -d debug information -p |
How to create a script?A script is a text file, and can be created with any text editor, for example notepad, vim, emacs, nano. Specific to the vim editor there is a syntax highlight file calc.vim, which makes it my favourite.When you write the script, you typically create variables, and perform calculations with these variables. Typically, you save the script to file, with extension '.calc', and run it with the qxcalc.exe command. |
An example:
We have the electrical circuit below, and we need to determine the energy dissipated in the resistors given current and resistance. We create variables i(current 10 A), and rp(one resistor 5 ohms). We calculate resistance (rres) of two parallell resistors(of 5 ohms each)), and voltage from current(10A) over the resistors. We calculate the power twice with the help of two different approaches:
We save the script to file, in this example we name the file cli-e2.calc. We want results as both HTML and latex. to create LaTeX, use -cd to create HTML, use -ch Running the sample scriptLet's run the above script with the following line(you need to do this in a console):qxcalc.exe -p cli-e2.calc -cd -ch Results of the above example are: |
|
The variables power, and power2, yield that the
power is 250 Watts, power and power2
are the same, which they also should be.
Generated files
We chose the script name to cli-e2.calc, the generated files are so:
|
|
QxCalc! and file namesFile name extensions and files generated by qxcalc.exe.
|