mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Add config("fraction_space") to control spaces around printing fractions
Added config("tilde_space", boolean) to help/config, along with a few few minor text improvements. Updated cal/regress to test config("tilde_space"). Added config("fraction_space", boolean). The "fraction_space" controls whether or not a space (' ') is printed before and after fractions. By default, config("fraction_space") is false. For example, with the default, config("fraction_space", 0): ; base(1/3), ; 1/7 1/7 With config("fraction_space", 1): ; base(1/3), ; 1/7 1 / 7 NOTE: Use of config("fraction_space", 1) can break printing and scanning of fractional values via "%r". NOTE: Use of config("fraction_space", 1) can break printing and scanning of complex values via "%c". Added config("fraction_space", boolean) to help/config, along with a few few minor text improvements. Updated cal/regress to test config("tilde_space").
This commit is contained in:
19
help/config
19
help/config
@@ -382,6 +382,9 @@ DESCRIPTION
|
||||
printed after leading tilde ('~'). See config("tilde") above.
|
||||
If config("tilde") is false, then config("tilde_space") has no effect.
|
||||
|
||||
NOTE: Use of config("tilde_space", 1) can break printing and scanning
|
||||
of complex values via "%c".
|
||||
|
||||
The initial "tilde_space" value is 0.
|
||||
|
||||
=-=
|
||||
@@ -899,6 +902,21 @@ DESCRIPTION
|
||||
|
||||
This config parameter is read-only and cannot be set.
|
||||
|
||||
=-=
|
||||
|
||||
config("fraction_space", boolean)
|
||||
|
||||
The "fraction_space" controls whether or not a space (' ') is
|
||||
printed both before and after '/' when printing a fraction.
|
||||
|
||||
NOTE: Use of config("fraction_space", 1) can break printing and scanning
|
||||
of fractional values via "%r".
|
||||
|
||||
NOTE: Use of config("fraction_space", 1) can break printing and scanning
|
||||
of complex values via "%c".
|
||||
|
||||
The initial "fraction_space" value is 0.
|
||||
|
||||
EXAMPLE
|
||||
; current_cfg = config("all");
|
||||
; config("tilde", off),;
|
||||
@@ -961,6 +979,7 @@ EXAMPLE
|
||||
redecl_warn 1
|
||||
dupvar_warn 1
|
||||
hz 100
|
||||
fraction_space 0
|
||||
|
||||
; display()
|
||||
20
|
||||
|
Reference in New Issue
Block a user