2 display - set and/or return decimal digits for displaying numbers
13 When given an argument, this function sets the maximum number of
14 digits after the decimal point to be printed in real or exponential
15 mode in normal unformatted printing (print, strprint, fprint) or in
16 formatted printing (printf, strprintf, fprintf) when precision is
17 not specified. The return value is the previous display digit value.
19 When given no arguments, this function returns the current
32 The display digit value does not change the stored value of a number.
33 It only changes how a stored value is displayed.
35 Where rounding is necessary to display up to d decimal places,
36 the type of rounding to be used is controlled by config("outround").
39 ; print display(), 2/3
40 20 ~0.66666666666666666667
42 ; print display(40), 2/3
43 20 ~0.6666666666666666666666666666666666666667
45 ; print display(5), 2/3
57 ## Copyright (C) 2004 Landon Curt Noll
59 ## Calc is open software; you can redistribute it and/or modify it under
60 ## the terms of the version 2.1 of the GNU Lesser General Public License
61 ## as published by the Free Software Foundation.
63 ## Calc is distributed in the hope that it will be useful, but WITHOUT
64 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
65 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
66 ## Public License for more details.
68 ## A copy of version 2.1 of the GNU Lesser General Public License is
69 ## distributed with calc under the filename COPYING-LGPL. You should have
70 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
71 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
73 ## @(#) $Revision: 30.1 $
74 ## @(#) $Id: display,v 30.1 2007/03/16 11:10:42 chongo Exp $
75 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/display,v $
77 ## Under source code control: 2004/07/25 23:50:40
78 ## File existed as early as: 2004
80 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
81 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/