⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changes

📁 Calc Software Package for Number Calc
💻
📖 第 1 页 / 共 5 页
字号:
    Quotations marks are recognized in a command like	    calc -f 'alpha beta'    in which the name of the file to be read includes a space.    (2) Flags are interpreted even if they are in a string, as in:	    calc "-q -i define f(x) = x^2;"    which has the effect of:	    calc -q -i "define f(x) = x^2;"    To achieve this, the use of getopts() in calc.c has been dropped in    favor of direct reading of the arguments produced by the shell.    In effect, until a "--" or "-s" or a calc command (recognized    by not starting with '-') is encountered, the quotation signs in    command lines like the above example are ignored.  Dropping getopts()    permits calc to specify completely the syntax rules calc will apply    to whatever it is given by the shell being used.    (3) For executable script (also called interpreter) files with first    line starting with "#!", the starting of options with -S has been    replaced by ending the options with -f.  For example, the first line:	    #! full_pathname_for_calc -S -q -i    is to be replaced by:	    #! full_pathname_for_calc -q -i -f    Thus, if the pathname is /usr/bin/calc and myfile contains:	    #!/usr/bin/calc -q -i -f	    global deg = pi()/180;	    define Sin(x) = sin(x * deg);    and has been made executable by:	    chmod u+x myfile    myfile would be like a version of calc that ignored any startup    files and had an already defined global variable deg and a function    Sin(x) which will return an approximation to the sine of x degrees.    The invocation of myfile may be followed by other options (since    the first line in the script has only flagged options) and/or calc    commands as in:	    ./myfile -c read alpha '; define f(x) = Sin(x)^2'    (The quotation marks avoid shell interpretation of the semicolon and    parentheses.)    (4) The old -S syntax for executable scripts implied the -s flag so that    arguments in an invocation like	    ./myfile alpha beta    are passed to calc; in this example argv(0) = 'alpha', argv(1) =    'beta'.  This has been changed in two ways: an explicit -s is required    in the first line of the script and then the arguments passed in the    above example are argv(0) = 'myfile', argv(1) = 'alpha', argv(1) = 'beta'.    In an ordinary command line, "-s" indicates that the shell words    after the one in which "-s" occurred are to be passed as arguments    rather than commands or options.  For example:	    calc "-q -s A = 27;" alpha beta    invokes calc with the q-flag set, one command "A = 27;", and two arguments.    (5) Piping to calc may be followed by calc becoming interactive.    This should occur if there is no -p flag but -i is specified, e.g.:	    cat beta | calc -i -f alpha    which will do essentially the same as:	    calc -i -f alpha -f beta    (6) The read and help commands have been  changed so that several    files may be referred to in succession by separating their names    by whitespace.  For example:	    ; read alpha beta gamma;    does essentially the same as:	    ; read alpha; read beta; read gamma;    This is convenient for commands like:	    calc read file?.cal    when file?.cal expands to something like file1.cal file2.cal file3.cal:	    myfiles='alpha beta gamma'	    calc read $myfiles    or for C-shell users:	    set myfiles=(alpha beta gamma)	    calc read $myfiles    (7) The -once option for read has been extended to -f.  For example,	    calc -f -once alpha    will ignore alpha if alpha has been read in the startup files.  In a    multiple read statement, -once applies only to the next named file.    For example	    ; read -once alpha beta -once gamma;    will read alpha and gamma only if they have not already been read,    but in any case, will read beta.    (8) A fault in the programming for the cd command has been corrected    so that specifying a directory by a string constant will work.  E.g:	    ; cd "my work"    should work if the current directory has a directory with name "my work".    (9) new functions bernoulli(n) and euler(n) have been defined to    return the Bernoulli number and the Euler number with index n.    After evaluation for an even positive n, this value and these for    smaller positive even n are stored in a table from which the values    can be reread when required.  The memory used for the stored values    can be freed by calling the function freebernoulli() or freeeuler().    The function catalan(n) returns the catalan number with index n.    This is evaluated using essentially comb(2*n, n)/(n+1).    (10) A function sleep(n) has been defined which for positive n calls    the system function sleep(n) if n is an integer, usleep(n) for other    real n.  This suspends operation for n seconds and returns the null    value except when n is integral and the sleep is interrupted by a    SIGINT, in which case the remaining number of seconds is returned.    (11) The effect of config("trace", 8) which displays opcodes of    functions as they are successfully defined has been restricted to    functions defined with explicit use of "define".  Thus, it has been    deactivated for the ephemeral functions used for evaluation of calc    command lines or eval() functions.    (12) The functions digit(), digits(), places() have been extended to    admit an optional additional argument for an integral greater-than-one    base which defaults to 10.  There is now no builtin limit on the    size of n in digit(x, n, b), for example, digit(1/7, -1e100) which    would not work before can now be handled.    (13) The function, digits(x), which returns the number of decimal    digits in the integer part of x has been changed so that if abs(x) <    1, it returns 0 rather than 1.  This also now applies to digits(x,b).    (14) Some programming in value.c has been improved.  In particular,    several occurrences of:	    vres->v_type = v1->v_type;	    ...	    if (v1->v_type < 0) {		    copyvalue(v1, vres);		    return;	    }    have been replaced by code that achieves exactly the same result:	    vres->v_type = v1->v_type;	    ...	    if (v1->v_type < 0)		    return;    (15) Some operations and functions involving null-valued arguments    have been changed so that they return null-value rather than "bad    argument-type" error-value.  E.g. null() << 2 is now null-valued    rather than a "bad argument for <<" error-value.    (16) "global" and "local" may now be used in expressions.  For example:	    ; for (local i = 0; i < 5; i++) print i^2;    is now acceptable, as is:	    ; define f(x = global x) = (global x = x)^2;    which breaks wise programming rules and would probably better be handled    by something like:	    ; global x	    ; define f(t = x) = (x = t)^2;    Both definitions produce the same code for f.  For non-null t, f(t)    returns t^2 and assigns the value of t to x;  f() and f(t) with null t    return x^2.    Within expressions, "global" and "local" are to be followed by just one    identifier.  In "(global a = 2, b)" the comma is a comma-operator; the    global variable a is created if necessary and assigned the value 2, the    variable b has to already exist.   The statement "global a = 2, b" is    a declaration of global variables and creates both a and b if they    don't already exist.    (18) In a config object, several components have been changed from    long to LEN so that they will now be 32 bit integers for machines with    either 32 or 64-bit longs.  In setting such components, the arguments    are now to less than 2^31.  Before this change:	    ; config("mul2", 2^32 + 3)    would be accepted on a 64-bit machine but result in the same as:	    ; config("mul2", 3)The following are the changes from calc version 2.11.2t0 to 2.11.2t1.0:    Fixed a bug whereby help files are not displayed correctly on    systems such as NetBSD 1.4.1.  Thanks to a fix from Jakob Naumann.    Changed EMail addresses to use asthe.com.  Changed URLs to use    www.isthe.com.  NOTE: The EMail address uses 'asthe' and the web    site URL uses 'isthe'.    Using calc-bugs at asthe dot com for calc bug reports,    calc-contrib at asthe dot com for calc contributions,    calc-tester-request at asthe dot com for requests to join calc-tester and    calc-tester at asthe dot com for the calc tester mailing list.    Replaced explicit EMail addresses found this file with the <user at    site dot domain> notation to reduce the potential for those folks    to be spammed.    The Makefile attempts to detect the existence of /dev/urandom with -e    instead of the less portable -c.    Misc Makefile fixes.The following are the changes from calc version 2.11.1t3 to 2.11.1t4:    Removed non-portable strerror() tests (3715, 3724 and 3728) from    calc/regress.cal.    Fixed missing strdup() from func.c problem.    Fixed a problem that would have come up on a very long #! command line    if the system permitted it.The following are the changes from calc version 2.11.1 to 2.11.1t2.2:    Placed calc under version 2.1 of the GNU Lesser General Public License.	The calc commands:	    help copyright	    help copying	    help copying-lgpl	should display the generic calc copyright as well as the contents	of the COPYING and COPYING-LGPL files.	Those files contain information about the calc's GNU Lesser General	Public License, and in particular the conditions under which you	are allowed to change it and/or distribute copies of it.    Removed the lint facility from the Makefile.  Eliminated Makefile    variables: ${LCFLAGS}, ${LINT}, ${LINTLIB} and ${LINTFLAGS}.    Removed the lint.sed file.    Cleaned up help display system.  Help file lines that begin with    '##' are not displayed.    Calc source and documentation now uses the the these terms:	*.cal files	calc resource file	*.a files	calc binary link library	#! files	calc shell script    Renamed 'help stdlib' to 'help resource'.	The 'help stdlib' is    aliased to 'help resource' for arg compatibility.    Renamed config("lib_debug") to config("resource_debug").    The config("lib_debug") will have the same effect as    config("resource_debug") for backward compatibility.    Renamed the source sub-directory lib to cal.  The default $CALCPATH    now uses ./cal:~/cal (instead of ./lib:~/lib).  Changed LIB_PASSDOWN    Makefile variable to CAL_PASSDOWN.    Fixed misc compile warnings and bugs.    Fixed problem of incorrect paths in the formation of installed    calc shell scripts.    Changed the recommended Comqaq cc compile to be -std0 -fast -O4 -static.    Fixed a problem related to asking for help for a non-existent file.    Added ./.calcinit to the default calcrc.    Added cscript/README and help cscript to document the calc shell    script supplied with calc.The following are the changes from calc version 2.11.0t10 to 2.11.0t11:    Misc code cleanup.	Removed dead code.  Removed trailing whitespace.    Fixed whitespace to make the best use of 8 character tabs.    Fixed some bugs relating to '// and %' in combination with some    of the the rounding modes based on a patch from Ernest Bowen    <ernie at turing dot une dot edu dot au>.    A patch from Klaus Alexander Seistrup <klaus at seistrup dot dk>, when    used in combination with the GNU-readline facility, will prevent    it from saving empty lines.    Minor typos fixed in regress.cal    Added 8500 test series and test8500.cal to perform more extensive    tests on // and % with various rounding modes.    The 'unused value ignored' messages now start with Line 999: instead    of just 999:.    Fixed the long standing issue first reported by Saber-C in the    domul() function in zmil.c thanks to a patch by E

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -