Funct

Funct is a program written in Perl, which allows users to create and customize functions.
Download

Funct Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Leonid Grinberg
  • Publisher web site:

Funct Tags


Funct Description

Funct is a program written in Perl, which allows users to create and customize functions. Funct is an application written in Perl, which allows users to create and customize functions. If you ever needed to perform a variety of functions on many different numbers, Funct is for you.Functions can be very simple arithmetic or more complex operations. They can even be entire programs!When the user is ready, they can run Funct directly from the command line for easy access.There are many different kinds of people that can use Funct. Examples are:· Computer graphical designers · Mathematicians · Programmers · Scientists · Musicians Although Funct is a simple program, I put it up as a big project because of its potential use to just about everyone. Funct is one of those programs that can be very useful but for some reason it does not yet exist. So if you think its not worth the effort, I am sorry but its staying.RUNNINGGo to the directory where you installed Funct. Run the command 'perlfunct.pl < initial number > < function name >' without the quotes. Replace< initial number > with the initial number you want to use (to which thefunctions will be applied) and < function name > with the name of thefunction that you want to use.USINGBy default there are 26 functions each named by a letter of theEnglish alphabet. They do not change the value of the number youenter. However, once you customize the program you can use it to dowhatever you want it to.CUSTOMIZINGAt 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 or 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 recommend 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 cannot 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:1. On the line right above the line 'sub print_res', write the following words, 'sub < name of function >'. Replace < name of function > with the name of the function that will be created.2. Put an open brace '{' on the next line.3. On the next line write '#edit function here'.4. On the next line write '$y='.5. On the same line right after '$y=' type what will be done to $x (see above).6. On the next line write '#end'.7. On the next line write '&print_res'.8. On the next line put a closed brace '}'.9. You're done!To remove a function delete everything from the words 'sub < functionname >' to its closed brace '}'.The following symbols will be understood by the perl interpreter:* multiplication/ division+ addition- subtraction^ to the power ofabs() absolute value (replace the pipe symbols '|' with the parentheses)() parenthesesRequirements:· Perl Requirements: · Perl


Funct Related Software