![]()
![]()
![]()
A general purpose calculator Rexxlet
By![]()
This "rexxlet" may be used in your HTML pages to evaluate any REXX valid expression.
Assuming you want to display the hexa value of a decimal number, in a statement as :
The value of 1515 (decimal) is 05EB (hexadecimal) Just include the following line in your page :
... The value of 1515 (decimal) is <img src="http://www.hhns.fr/rexxlet/rxcalc.cgi?small+aqua+d2x(1515)" align=center> (hexadecimal)
- the first parameter is the font's size : Tiny, Small, Medium, Large, Giant (1st letter good enough).
- the second parameter is the 'BGCOLOR' parameter (some kind of blue here).
- the third parameter is any valid REXX expression you want to be evaluated.
(the "+" sign must be entered as '%2B')The result will look like:
... The value of 1515 (decimal) is (hexadecimal)
You may use any builtin REXX function, plus the following functions:
- sin(r)
- cos(r)
- atan(r)
- atan2(r1,r2)
- fact(n)
- pow(r1,r2)
- exp(r)
- log(r)
Other examples :
Euro to FF converter, BGColor Yellow :
115 Euros make about
<img src="http://www.hhns.fr/rexxlet/rxcalc.cgi?small+yellow+format(115/0.1515,6,2)"align=center> FF.The result will look like:
115 Euros make about FF.
A 'Scientific' computation : atan(1), result in degrees, BGColor Red :
atan(1) =
<img src="http://www.hhns.fr/rexxlet/rxcalc.cgi?small+red+format(atan(1)*180/3.14159)"align=center> degrees.The result will look like:
atan(1) = degrees.
Test it with your own values :
Enter manually http://www.hhns.fr/rexxlet/rxcalc.cgi?medium+red+2*2 in your navigation bar, then modify the expression (remember : '%2B' for the '+' sign, and '%2F' for the '/' [divide] sign).
or, better,click here, (you'll get a new window) then modify the expression '2*2' in the navigation bar. You may specify the color either by its hex value (i.e. 00FFFF), or by its official name (Red, blue, Yellow ...)
By default : 'fuschia'.
Have a look to the rxcalc program source
Return to the HHNS's REXX Workbench home page