Funct version 0.1
(c) Leonid Grinberg 2005
All Rights Reserved
INTRODUCTION
Funct is a simple program which can store functions. If you need to do
the same function to different numbers, you can use a
calculator or do it in your head. But if you need to do 20 opeerations
to different numbers in different order every time, Funct is for you.
The purpose of Funct is to allow users to do some function to a
number (they can define both function and supply the number) both
easily and fast.
Funct is extremely configurable and reliable
SYSTEM REQUIREMENTS
Because Funct is writen in Perl, an interpreted language, all that you
need to run Funct is Perl.
INSTALLING
Decompress the file funct.tar.gz
RUNNING
Go to the directory where you installed Funct. Run the command 'perl
funct.pl < initial number > < function name >' without the quotes. Replace
< initial number > with the initial number you want to use (to which the
functions will be applied) and < function name > with the name of the
function that you want to use.
USING
By default there are 26 functions each named by a letter of the
english alphabet. They do not change the value of the number you
enter. However, once you customize the program you can use it to do
whatever you want it to.
CUSTOMIZING
At this point, there are three things that you can customize, the names
of the functions, how many functions there are (this is done by adding
ot removing functions), and what they do (the reason that those are
the only things is that there is nothing left to customize. This may
change as time goes on).
In order to customize the file, open the file funct.pl with your
favorite editor. I reccomend making a back up copy of the program
before you edit it (just in case) but this is of course entirely up to
you.
To change the name of the function find its current name next to the
word sub. (By default there are 26 functions, each named by the letter
of the alphabet.) Change what it is. Do not let it begin with a
number, have spaces, be the same name as another function, or have
dashes. Also, some functions which are already predefined canot be
used. If you get an error message after changing the name, try
something else.
To change the value of a function, go inside the braces of the
function you want to change (So if you want to change the function
called 'foo' go inside foo, that is inside the braces which begin
below the words 'sub foo' and end at some point below. Go to the place
which is between the lines which say '#edit function here' and
'#stop'. Go past the point which says '$y='. Everything after here you
can change. You will be adding or subtracting to the value of the
variable $x (variables MUST begin with the '$' sign). The rules of
PEMDAS do apply but I still advise you to use parentheses. Also, make
sure that there is a semicolon at the end of the expression.
NOTE TO ADVANCED USERS: THIS IS PURE PERL. IF YOU KNOW WHAT YOU ARE
DOING, GO AHEAD, ADD FOR LOOPS, IF STATEMENTS, AND THE LIKE.
To create a function, follow the following steps:
- On the line right above the line 'sub print_res', write the
following words, 'sub > name of function <'. Replace with the name of the function that will be created.
- Put an open brace '{' on the next line.
- On the next line write '#edit function here'.
- On the next line write '$y='.
- On the same line right after '$y=' type what will be done to $x
(see above).
- On the next line write '#end'.
- On the next line write '&print_res'.
- On the next line put a closed brace '}'.
- You're done!
To remove a function delete everything from the words 'sub ' to its closed brace '}'.
The following symbols will be understood by the perl interpreter:
* multiplication
/ division
+ addition
- subtraction
^ to the power of
abs() absolute value (replace the pipe simbols '|' with the parentheses)
() parentheses
VERSION INFO.
This is version .1. It is fully usable but has little feautures and is
not very user-friendly. Hopefully, as times go on, Funct can be
updated.
LICENCE INFORMATION
Funct is licenced under the GNU General Public Licence. See the file
'COPYING.txt' for the licence.
Please go to Funct's official site at http://funct.sourceforge.net for
more info.