2 config - configuration parameters
5 config(parameter [,value])
9 value int, string, config state
14 The config() builtin affects how the calculator performs certain
15 operations. Among features that are controlled by these parameters
16 are the accuracy of some calculations, the displayed format of results,
17 the choice from possible alternative algorithms, and whether or not
18 debugging information is displayed. The parameters are
19 read or set using the "config" built-in function; they remain in effect
20 until their values are changed by a config or equivalent instruction.
22 The following parameters can be specified:
24 "all" all configuration values listed below
26 "trace" turns tracing features on or off
27 "display" sets number of digits in prints.
28 "epsilon" sets error value for transcendentals.
29 "maxprint" sets maximum number of elements printed.
30 "mode" sets printout mode.
31 "mode2" sets 2nd base printout mode.
32 "mul2" sets size for alternative multiply.
33 "sq2" sets size for alternative squaring.
34 "pow2" sets size for alternate powering.
35 "redc2" sets size for alternate REDC.
36 "tilde" enable/disable printing of the roundoff '~'
37 "tab" enable/disable printing of leading tabs
38 "quomod" sets rounding mode for quomod
39 "quo" sets rounding mode for //, default for quo
40 "mod" sets "rounding" mode for %, default for mod
41 "sqrt" sets rounding mode for sqrt
42 "appr" sets rounding mode for appr
43 "cfappr" sets rounding mode for cfappr
44 "cfsim" sets rounding mode for cfsim
45 "round" sets rounding mode for round and bround
46 "outround" sets rounding mode for printing of numbers
47 "leadzero" enables/disables printing of 0 as in 0.5
48 "fullzero" enables/disables padding zeros as in .5000
49 "maxscan" maximum number of scan errors before abort
50 "prompt" default interactive prompt
51 "more" default interactive multi-line input prompt
52 "blkmaxprint" number of block octets to print, 0 means all
53 "blkverbose" TRUE => print all lines, FALSE=>skip duplicates
54 "blkbase" block output base
55 "blkfmt" block output format
56 "calc_debug" controls internal calc debug information
57 "resource_debug" controls resource file debug information
58 "user_debug" for user defined debug information
59 "verbose_quit" TRUE => print message on empty quit or abort
60 "ctrl_d" The interactive meaning of ^D (Control D)
61 "program" Read-only calc program or shell script path
62 "basename" Read-only basename of the program value
63 "windows" Read-only indicator of MS windows
64 "cygwin" TRUE=>calc compiled with cygwin, Read-only
65 "compile_custom" TRUE=>calc was compiled with custom functions
66 "allow_custom" TRUE=>custom functions are enabled
67 "version" Read-only calc version
68 "baseb" bits in calculation base, a read-only value
69 "redecl_warn" TRUE => warn when redeclaring
70 "dupvar_warn" TRUE => warn when variable names collide
71 "hz" Read-only operating system tick rate or 0
73 The "all" config value allows one to save/restore the configuration
74 set of values. The return of:
78 is a CONFIG type which may be used as the 2rd arg in a later call.
79 One may save, modify and restore the configuration state as follows:
81 oldstate = config("all")
86 config("all", oldstate)
88 This save/restore method is useful within functions.
89 It allows functions to control their configuration without impacting
92 There are two configuration state aliases that may be set. To
93 set the backward compatible standard configuration:
95 config("all", "oldstd")
97 The "oldstd" will restore the configuration to the default at startup.
99 A new configuration that some people prefer may be set by:
101 config("all", "newstd")
103 The "newstd" is not backward compatible with the historic
104 configuration. Even so, some people prefer this configuration
105 and place the config("all", "newstd") command in their CALCRC
106 startup files; newstd may also be established by invoking calc
109 The following are synonyms for true:
120 The following are synonyms for false:
131 Examples of setting some parameters are:
133 config("mode", "exp"); exponential output
134 config("display", 50); 50 digits of output
135 epsilon(epsilon() / 8); 3 bits more accuracy
136 config("tilde", 0) disable roundoff tilde printing
137 config("tab", "off") disable leading tab printing
141 config("trace", bitflag)
143 When nonzero, the "trace" parameter activates one or more features
144 that may be useful for debugging. These features correspond to
145 powers of 2 which contribute additively to config("trace"):
147 1: opcodes are displayed as functions are evaluated
149 2: disables the inclusion of debug lines in opcodes for functions
150 whose definitions are introduced with a left-brace.
152 4: the number of links for real and complex numbers are displayed
153 when the numbers are printed; for real numbers "#" or for
154 complex numbers "##", followed by the number of links, are
155 printed immediately after the number.
157 8: the opcodes for a new functions are displayed when the function
158 is successfully defined.
160 See also resource_debug, calc_debug and user_debug below for more
165 config("display", int)
167 The "display" parameter specifies the maximum number of digits after
168 the decimal point to be printed in real or exponential mode in
169 normal unformatted printing (print, strprint, fprint) or in
170 formatted printing (printf, strprintf, fprintf) when precision is not
171 specified. The initial value for oldstd is 20, for newstd 10.
172 The parameter may be changed to the value d by either
173 config("display", d) or by display (d). This parameter does not change
174 the stored value of a number. Where rounding is necessary to
175 display up to d decimal places, the type of rounding to be used is
176 controlled by config("outround").
180 config("epsilon", real)
183 The "epsilon" parameter specifies the default accuracy for the
184 calculation of functions for which exact values are not possible or
185 not desired. For most functions, the
187 remainder = exact value - calculated value
189 has absolute value less than epsilon, but, except when the sign of
190 the remainder is controlled by an appropriate parameter, the
191 absolute value of the remainder usually does not exceed epsilon/2.
192 Functions which require an epsilon value accept an
193 optional argument which overrides this default epsilon value for
194 that single call. The value v can be assigned to the "epsilon"
195 parameter by either config("epsilon", v) or epsilon(v); each of
196 these functions return the current epsilon value; config("epsilon")
197 or epsilon() returns but does not change the epsilon value.
198 For the transcendental functions and the functions sqrt() and
199 appr(), the calculated value is always a multiple of epsilon.
203 config("mode", "mode_string")
204 config("mode2", "mode_string")
206 The "mode" parameter is a string specifying the mode for printing of
207 numbers by the unformatted print functions, and the default
208 ("%d" specifier) for formatted print functions. The initial mode
209 is "real". The available modes are:
211 config("mode") meaning equivalent
214 "binary" base 2 fractions base(2)
217 "octal" base 8 fractions base(8)
220 "real" base 10 floating point base(10)
224 "integer" base 10 integer base(-10)
227 "hexadecimal" base 16 fractions base(16)
230 "fraction" base 10 fractions base(1/3)
233 "scientific" base 10 scientific notation base(1e20)
237 Where multiple strings are given, the first string listed is what
238 config("mode") will return.
240 The "mode2" controls the double base output. When set to a value
241 other than "off", calc outputs files in both the "base" mode as
242 well as the "base2" mode. The "mode2" value may be any of the
243 "mode" values with the addition of:
245 "off" disable 2nd base output mode base2(0)
247 The base() builtin function sets and returns the "mode" value.
248 The base2() builtin function sets and returns the "mode2" value.
250 The default "mode" is "real". The default "mode2" is "off".
254 config("maxprint", int)
256 The "maxprint" parameter specifies the maximum number of elements to
257 be displayed when a matrix or list is printed. The initial value is 16.
264 Mul2 and sq2 specify the sizes of numbers at which calc switches
265 from its first to its second algorithm for multiplying and squaring.
266 The first algorithm is the usual method of cross multiplying, which
267 runs in a time of O(N^2). The second method is a recursive and
268 complicated method which runs in a time of O(N^1.585). The argument
269 for these parameters is the number of binary words at which the
270 second algorithm begins to be used. The minimum value is 2, and
271 the maximum value is very large. If 2 is used, then the recursive
272 algorithm is used all the way down to single digits, which becomes
273 slow since the recursion overhead is high. If a number such as
274 1000000 is used, then the recursive algorithm is almost never used,
275 causing calculations for large numbers to slow down.
277 Units refer to internal calculation digits where each digit
278 is BASEB bits in length. The value of BASEB is returned by
281 The default value for config("sq2") is 3388. This default was
282 established on a 1.8GHz AMD 32-bit CPU of ~3406 BogoMIPS when
283 the two algorithms are about equal in speed. For that CPU test,
284 config("baseb") was 32. This means that by default numbers up to
285 (3388*32)+31 = 108447 bits in length (< 32645 decimal digits) use
286 the 1st algorithm, for squaring.
288 The default value for config("mul2") is 1780. This default was
289 established on a 1.8GHz AMD 32-bit CPU of ~3406 BogoMIPS when
290 the two algorithms are about equal in speed. For that CPU test,
291 config("baseb") was 32. This means that by default numbers up to
292 (1779*32)+31 = 56927 bits in length (< 17137 decimal digits) use
293 the 1st algorithm, for multiplication.
295 A value of zero resets the parameter back to their default values.
297 The value of 1 and values < 0 are reserved for future use.
299 Usually there is no need to change these parameters.
305 Pow2 specifies the sizes of numbers at which calc switches from
306 its first to its second algorithm for calculating powers modulo
307 another number. The first algorithm for calculating modular powers
308 is by repeated squaring and multiplying and dividing by the modulus.
309 The second method uses the REDC algorithm given by Peter Montgomery
310 which avoids divisions. The argument for pow2 is the size of the
311 modulus at which the second algorithm begins to be used.
313 Units refer to internal calculation digits where each digit
314 is BASEB bits in length. The value of BASEB is returned by
317 The default value for config("pow2") is 176. This default was
318 established on a 1.8GHz AMD 32-bit CPU of ~3406 BogoMIPS when
319 the two algorithms are about equal in speed. For that CPU test,
320 config("baseb") was 32. This means that by default numbers up to
321 (176*32)+31 = 5663 bits in length (< 1704 decimal digits) use the
322 1st algorithm, for calculating powers modulo another number.
324 A value of zero resets the parameter back to their default values.
326 The value of 1 and values < 0 are reserved for future use.
328 Usually there is no need to change these parameters.
334 Redc2 specifies the sizes of numbers at which calc switches from
335 its first to its second algorithm when using the REDC algorithm.
336 The first algorithm performs a multiply and a modular reduction
337 together in one loop which runs in O(N^2). The second algorithm
338 does the REDC calculation using three multiplies, and runs in
339 O(N^1.585). The argument for redc2 is the size of the modulus at
340 which the second algorithm begins to be used.
342 Units refer to internal calculation digits where each digit
343 is BASEB bits in length. The value of BASEB is returned by
346 The default value for config("redc2") is 220. This default was
347 established as 5/4 (the historical ratio of config("pow2") to
348 config("pow2")) of the config("pow2") value. This means that if
349 config("baseb") is 32, then by default numbers up to (220*32)+31 =
350 7071 bits in length (< 2128 decimal digits) use the REDC algorithm,
351 for calculating powers modulo another number.
353 A value of zero resets the parameter back to their default values.
355 The value of 1 and values < 0 are reserved for future use.
357 Usually there is no need to change these parameters.
361 config("tilde", boolean)
363 Config("tilde") controls whether or not a leading tilde ('~') is
364 printed to indicate that a number has not been printed exactly
365 because the number of decimal digits required would exceed the
366 specified maximum number. The initial "tilde" value is 1.
370 config("tab", boolean)
372 Config ("tab") controls the printing of a tab before results
373 automatically displayed when working interactively. It does not
374 affect the printing by the functions print, printf, etc. The initial
379 config("quomod", bitflag)
380 config("quo", bitflag)
381 config("mod", bitflag)
382 config("sqrt", bitflag)
383 config("appr", bitflag)
384 config("cfappr", bitflag)
385 config("cfsim", bitflag)
386 config("outround", bitflag)
387 config("round", bitflag)
389 The "quomod", "quo", "mod", "sqrt", "appr", "cfappr", "cfsim", and
390 "round" control the way in which any necessary rounding occurs.
391 Rounding occurs when for some reason, a calculated or displayed
392 value (the "approximation") has to differ from the "true value",
393 e.g. for quomod and quo, the quotient is to be an integer, for sqrt
394 and appr, the approximation is to be a multiple of an explicit or
395 implicit "epsilon", for round and bround (both controlled by
396 config("round")) the number of decimal places or fractional bits
397 in the approximation is limited. Zero value for any of these
398 parameters indicates that the true value is greater than the approximation,
399 i.e. the rounding is "down", or in the case of mod, that the
400 residue has the same sign as the divisor. If bit 4 of the
401 parameter is set, the rounding of to the nearest acceptable candidate
402 when this is uniquely determined; in the remaining ambiguous cases,
403 the type of rounding is determined by the lower bits of the parameter
404 value. If bit 3 is set, the rounding for quo, appr and sqrt,
405 is to the nearest even integer or the nearest even multiple of epsilon,
406 and for round to the nearest even "last decimal place". The effects
407 of the 3 lowest bits of the parameter value are as follows:
409 Bit 0: Unconditional reversal (down to up, even to odd, etc.)
410 Bit 1: Reversal if the exact value is negative
411 Bit 2: Reversal if the divisor or epsilon is negative
413 (Bit 2 is irrelevant for the functions round and bround since the
414 equivalent epsilon (a power of 1/10 or 1/2) is always positive.)
416 For quomod, the quotient is rounded to an integer value as if
417 evaluating quo with config("quo") == config("quomod"). Similarly,
418 quomod and mod give the same residues if config("mod") == config("quomod").
420 For the sqrt function, if bit 5 of config("sqrt") is set, the exact
421 square-root is returned when this is possible; otherwise the
422 result is rounded to a multiple of epsilon as determined by the
423 five lower order bits. Bit 6 of config("sqrt") controls whether the
424 principal or non-principal square-root is returned.
426 For the functions cfappr and cfsim, whether the "rounding" is down
427 or up, etc. is controlled by the appropriate bits of config("cfappr")
428 and config("cfsim") as for quomod, quo, etc.
430 The "outround" parameter determines the type of rounding to be used
431 by the various kinds of printing to the output: bits 0, 1, 3 and 4
432 are used in the same way as for the functions round and bround.
434 The C language method of modulus and integer division is:
442 config("leadzero", boolean)
444 The "leadzero" parameter controls whether or not a 0 is printed
445 before the decimal point in non-zero fractions with absolute value
446 less than 1, e.g. whether 1/2 is printed as 0.5 or .5. The
447 initial value is 0, corresponding to the printing .5.
451 config("fullzero", boolean)
453 The "fullzero" parameter controls whether or not in decimal floating-
454 point printing, the digits are padded with zeros to reach the
455 number of digits specified by config("display") or by a precision
456 specification in formatted printing. The initial value for this
457 parameter is 0, so that, for example, if config("display") >= 2,
458 5/4 will print in "real" mode as 1.25.
462 config("maxscan", int)
464 The maxscan value controls how many scan errors are allowed
465 before the compiling phase of a computation is aborted. The initial
466 value of "maxscan" is 20. Setting maxscan to 0 disables this feature.
470 config("prompt", str)
472 The default prompt when in interactive mode is "> ". One may change
473 this prompt to a more cut-and-paste friendly prompt by:
475 config("prompt", "; ")
477 On windowing systems that support cut/paste of a line, one may
478 cut/copy an input line and paste it directly into input. The
479 leading ';' will be ignored.
485 When inside multi-line input, the more prompt is used. One may
488 config("more", ";; ")
492 config("blkmaxprint", int)
494 The "blkmaxprint" config value limits the number of octets to print
495 for a block. A "blkmaxprint" of 0 means to print all octets of a
496 block, regardless of size.
498 The default is to print only the first 256 octets.
502 config("blkverbose", boolean)
504 The "blkverbose" determines if all lines, including duplicates
505 should be printed. If TRUE, then all lines are printed. If false,
506 duplicate lines are skipped and only a "*" is printed in a style
507 similar to od. This config value has not meaning if "blkfmt" is "str".
509 The default value for "blkverbose" is FALSE: duplicate lines are
514 config("blkbase", "blkbase_string")
516 The "blkbase" determines the base in which octets of a block
517 are printed. Possible values are:
519 "hexadecimal" Octets printed in 2 digit hex
523 "octal" Octets printed in 3 digit octal
526 "character" Octets printed as chars with non-printing
527 "char" chars as \123 or \n, \t, \r
529 "binary" Octets printed as 0 or 1 chars
532 "raw" Octets printed as is, i.e. raw binary
535 Where multiple strings are given, the first string listed is what
536 config("blkbase") will return.
538 The default "blkbase" is "hexadecimal".
542 config("blkfmt", "blkfmt_string")
544 The "blkfmt" determines for format of how block are printed:
546 "lines" print in lines of up to 79 chars + newline
549 "strings" print as one long string
553 "od_style" print in od-like format, with leading offset,
554 "odstyle" followed by octets in the given base
557 "hd_style" print in hex dump format, with leading offset,
558 "hdstyle" followed by octets in the given base, followed
559 "hd" by chars or '.' if no-printable or blank
562 Where multiple strings are given, the first string listed is what
563 config("blkfmt") will return.
565 The default "blkfmt" is "hd_style".
569 config("calc_debug", bitflag)
571 The "calc_debug" is intended for controlling internal calc routines
572 that test its operation, or collect or display information that
573 might be useful for debug purposes. Much of the output from these
574 will make sense only to calc wizards. Zero value (the default for
575 both oldstd and newstd) of config("resource_debug") corresponds to
576 switching off all these routines. For nonzero value, particular
577 bits currently have the following meanings:
579 n Meaning of bit n of config("calc_debug")
581 0 outputs shell commands prior to execution
583 1 outputs currently active functions when a quit instruction
586 2 some details of hash states are included in the output
587 when these are printed
589 3 when a function constructs a block value, tests are
590 made that the result has the properties required for use of
591 that block, e.g. that the pointer to the start of the
592 block is not NULL, and that its "length" is not negative.
593 A failure will result in a runtime error.
595 4 Report on changes to the state of stdin as well as changes
596 to internal variables that control the setting and restoring
599 5 Report on changes to the run state of calc.
601 6 Report on rand() subtractive 100 shuffle generator issues.
603 7 Report on custom function issues.
605 Bits >= 8 are reserved for future use and should not be used at this time.
607 By default, "calc_debug" is 0. The initial value may be overridden
608 by the -D command line option.
612 config("resource_debug", bitflag)
613 config("lib_debug", bitflag)
615 The "resource_debug" parameter is intended for controlling the possible
616 display of special information relating to functions, objects, and
617 other structures created by instructions in calc scripts.
618 Zero value of config("resource_debug") means that no such information
619 is displayed. For other values, the non-zero bits which currently
620 have meanings are as follows:
622 n Meaning of bit n of config("resource_debug")
624 0 When a function is defined, redefined or undefined at
625 interactive level, a message saying what has been done
628 1 When a function is defined, redefined or undefined during
629 the reading of a file, a message saying what has been done
632 2 Show func will display more information about a functions
633 arguments and argument summary information.
635 3 During execution, allow calc standard resource files
636 to output additional debugging information.
638 The value for config("resource_debug") in both oldstd and newstd
639 is 3, but if calc is invoked with the -d flag, its initial value
640 is zero. Thus, if calc is started without the -d flag, until
641 config("resource_debug") is changed, a message will be output when
642 a function is defined either interactively or during the reading of
645 The name config("lib_debug") is equivalent to config("resource_debug")
646 and is included for backward compatibility.
648 By default, "resource_debug" is 3. The -d flag changes this default to 0.
649 The initial value may be overridden by the -D command line option.
653 config("user_debug", int)
655 The "user_debug" is provided for use by users. Calc ignores this value
656 other than to set it to 0 by default (for both "oldstd" and "newstd").
657 No calc code or standard resource should change this value. Users
658 should feel free to use it in any way. In particular they may
659 use particular bits for special purposes as with "calc_debug", or
660 they may use it to indicate a debug level with larger values
661 indicating more stringent and more informative tests with presumably
662 slower operation or more memory usage, and a particular value (like
663 -1 or 0) corresponding to "no tests".
665 By default, "user_debug" is 0. The initial value may be overridden
666 by the -D command line option.
670 config("verbose_quit", boolean)
672 The "verbose_quit" controls the print of the message:
674 quit or abort executed
676 when a non-interactive quit or abort without an argument is encountered.
677 A quit of abort without an argument does not display a message when
678 invoked at the interactive level.
680 By default, "verbose_quit" is false.
684 config("ctrl_d", "ctrl_d_string")
686 For calc that is using the calc binding (not GNU-readline) facility:
688 The "ctrl_d" controls the interactive meaning of ^D (Control D):
690 "virgin_eof" If ^D is the only character that has been typed
691 "virgineof" on a line, then calc will exit. Otherwise ^D
692 "virgin" will act according to the calc binding, which
693 "default" by default is a Emacs-style delete-char.
695 "never_eof" The ^D never exits calc and only acts according
696 "nevereof" calc binding, which by default is a Emacs-style
699 "empty_eof" The ^D always exits calc if typed on an empty line.
700 "emptyeof" This condition occurs when ^D either the first
701 "empty" character typed, or when all other characters on
702 the line have been removed (say by deleting them).
704 Where multiple strings are given, the first string listed is what
705 config("ctrl_d") will return.
707 Note that config("ctrl_d") actually controls each and every character
708 that is bound to ``delete_char''. By default, ``delete_char'' is
709 Control D. Any character(s) bound to ``delete_char'' will cause calc
710 to exit (or not exit) as directed by config("ctrl_d").
712 See the ``binding'' help for information on the default calc bindings.
714 The default "ctrl_d", without GNU-readline is "virgin_eof".
716 For calc that was compiled with the GNU-readline facility:
718 The "ctrl_d" controls the interactive meaning of ^D (Control D):
720 "virgin_eof" Same as "empty_eof"
725 "never_eof" The ^D never exits calc and only acts according
726 "nevereof" calc binding, which by default is a Emacs-style
729 "empty_eof" The ^D always exits calc if typed on an empty line.
730 "emptyeof" This condition occurs when ^D either the first
731 "empty" character typed, or when all other characters on
733 Where multiple strings are given, the first string listed is what
734 config("ctrl_d") will return.
736 The default "ctrl_d", with GNU-readline is effectively "empty_eof".
738 Literally it is "virgin_eof", but since "virgin_eof" is the
739 same as "empty_eof", the default is effectively "empty_eof".
741 Emacs users may find the default behavior objectionable, particularly
742 when using the GNU-readline facility. Such users may want to add the line:
744 config("ctrl_d", "never_eof"),;
746 to their ~/.calcrc startup file to prevent ^D from causing calc to exit.
750 config("program") <== NOTE: This is a read-only config value
752 The full path to the calc program, or the calc shell script can be
757 This config parameter is read-only and cannot be set.
761 config("basename") <== NOTE: This is a read-only config value
763 The calc program, or the calc shell script basename can be obtained by:
767 The config("basename") is the config("program") without any leading
768 path. If config("program") has a / in it, config("basename") is
769 everything after the last /, otherwise config("basename") is the
770 same as config("program").
772 This config parameter is read-only and cannot be set.
776 config("windows") <== NOTE: This is a read-only config value
778 Returns TRUE if you are running on a MS windows system, false if you
779 are running on an operating system that does not hate you.
781 This config parameter is read-only and cannot be set.
785 config("cygwin") <== NOTE: This is a read-only config value
787 Returns TRUE if you calc was compiled with cygwin, false otherwise.
789 This config parameter is read-only and cannot be set.
793 config("compile_custom") <== NOTE: This is a read-only config value
795 Returns TRUE if you calc was compiled with -DCUSTOM. By default,
796 the calc Makefile uses ALLOW_CUSTOM= -DCUSTOM so by default
797 config("compile_custom") is TRUE. If, however, calc is compiled
798 without -DCUSTOM, then config("compile_custom") will be FALSE.
800 The config("compile_custom") value is only affected by compile
801 flags. The calc -D runtime command line option does not change
802 the config("compile_custom") value.
804 See also config("allow_custom").
806 This config parameter is read-only and cannot be set.
810 config("allow_custom") <== NOTE: This is a read-only config value
812 Returns TRUE if you custom functions are enabled. To allow the use
813 of custom functions, calc must be compiled with -DCUSTOM (which it
814 is by default) AND calc run be run with the -D runtime command line
815 option (which it is not by default).
817 If config("allow_custom") is TRUE, then custom functions are allowed.
818 If config("allow_custom") is FALSE, then custom functions are not
821 See also config("compile_custom").
823 This config parameter is read-only and cannot be set.
827 config("version") <== NOTE: This is a read-only config value
829 The version string of the calc program can be obtained by:
833 This config parameter is read-only and cannot be set.
837 config("baseb") <== NOTE: This is a read-only config value
839 Returns the number of bits in the fundamental base in which
840 internal calculations are performed. For example, a value of
841 32 means that calc will perform many internal calculations in
842 base 2^32 with digits that are 32 bits in length.
844 For libcalc programmers, this is the value of BASEB as defined
845 in the zmath.h header file.
847 This config parameter is read-only and cannot be set.
851 config("redecl_warn", boolean)
853 Config("redecl_warn") controls whether or not a warning is issued
854 when redeclaring variables.
856 The initial "redecl_warn" value is 1.
860 config("dupvar_warn", boolean)
862 Config("dupvar_warn") controls whether or not a warning is issued
863 when a variable name collides with an exist name of a higher scope.
864 Examples of collisions are when:
866 * both local and static variables have the same name
867 * both local and global variables have the same name
868 * both function parameter and local variables have the same name
869 * both function parameter and global variables have the same name
871 The initial "redecl_warn" value is 1.
875 config("hz") <== NOTE: This is a read-only config value
877 Returns the rate at which the operating system advances the clock
878 on POSIX based systems. Returns 0 on non-POSIX based systems.
879 The non-zero value returned is in Hetrz.
881 This config parameter is read-only and cannot be set.
885 ; current_cfg = config("all");
886 ; config("tilde", off),;
887 ; config("calc_debug", 15),;
888 ; config("all") == current_cfg
890 ; config("all", current_cfg),;
891 ; config("all") == current_cfg
901 epsilon 0.00000000000000000001
926 blkbase "hexadecimal"
948 ; config("display", 50),;
959 usage, custom, custom_cal, usage, epsilon, display
961 ## Copyright (C) 1999-2007 Landon Curt Noll
963 ## Calc is open software; you can redistribute it and/or modify it under
964 ## the terms of the version 2.1 of the GNU Lesser General Public License
965 ## as published by the Free Software Foundation.
967 ## Calc is distributed in the hope that it will be useful, but WITHOUT
968 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
969 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
970 ## Public License for more details.
972 ## A copy of version 2.1 of the GNU Lesser General Public License is
973 ## distributed with calc under the filename COPYING-LGPL. You should have
974 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
975 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
977 ## @(#) $Revision: 30.3 $
978 ## @(#) $Id: config,v 30.3 2007/09/21 01:27:27 chongo Exp $
979 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/config,v $
981 ## Under source code control: 1991/07/21 04:37:17
982 ## File existed as early as: 1991
984 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
985 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/