Add config("complex_space") to control spaces around + or - in complex values

Added config("fraction_space", boolean) to help/config, along with
a few few minor text improvements.  Updated cal/regress to test
config("tilde_space").

Added config("complex_space", boolean).  The "complex_space" controls
whether or not a space (' ') is printed before and after the + or -
in complex values.

By default, config("complex_space") is false.

For example, with the default, config("complex_space", 0):

    ; asin(2)
	    1.57079632679489661923-1.31695789692481670863i

With config("complex_space", 1):

    ; asin(2)
	    1.57079632679489661923 - 1.31695789692481670863i

NOTE: Use of config("complex_space", 1) can break printing and scanning
      of fractional values via "%r".

NOTE: Use of config("complex_space", 1) can break printing and scanning
      of complex values via "%c".

Added config("complex_space", boolean) to help/config, along with
a few few minor text improvements.  Updated cal/regress to test
config("complex_space").
This commit is contained in:
Landon Curt Noll
2022-12-04 00:53:15 -08:00
parent 348f3ed427
commit f4f19f21dc
5 changed files with 101 additions and 34 deletions

View File

@@ -547,8 +547,10 @@ define test_config()
'563: config("tilde_space") == 0');
vrfy(config("fraction_space") == 0,
'564: config("fraction_space") == 0');
vrfy(config("complex_space") == 0,
'565: config("complex_space") == 0');
print '565: Ending test_config';
print '566: Ending test_config';
}
print '010: parsed test_config()';