A multiprecision calculator can be set up with this particular code.
- Code: Select all
/* REXX */
numeric digits 1000
parse arg chalk
interpret "cheese=" chalk
say cheese
exit
This makes a 1000 digit command-line calculator, in so few lines. You then can add subroutines and internal variables to said calculator. For example, i save this as test.rex, and ran
test 2/3 at the prompt. It gives many rows of '6', followed by a 7.
You can then write your own command line functions, and even invoke external commands. For example, you could set the thing up to evaluate a polynomial, and then pass the result out to ubasic or factor to factorise the number.
REXX is a relatively old proggie, with very good string handling, and bignum calculations. I use it for all sorts of things from configuring the Windows desktop, to installing Windows, to doing calculations, writing web pages (my whole site is maintained by two different REXX scripts).
Well, it's pretty GP proggie, that you can even set up for a filter. One thing i have REXX controlling, is the deletion of duplicate download files. I simply create two directories, eg old and new, and run delsame.rex over the lot. It picks out the ones that have duplicate size and checksum, and you then can do a fc /b to see if they are identical. Actually, you can even coax rexx to do that.
One of the proggies i have on the internet floating around there, is a rexx script that will make bootable floppy disks. Ho hum. I mean, it's not hard. If you want, eg a blank 160k DR-DOS boot disk, it's pretty straight-forward.
Well.