Closed depler closed 3 years ago
Those are good ideas.
For the first, there is already an environment variable, BC_LINE_LENGTH
, that can be used to do that. You just set it to a large number. Would that work, or would that still not be convenient (and I use that word for a reason; I do want it to be easy for you) on Windows? Also, if you want a separate option to remove line limits entirely, why?
For the second, I think that one might be a really good idea. EDIT: However, could this be implemented by something like a function in the math library such that it's not a global option affecting all numbers? Would that be better? Should we have both?
In both of these cases, I don't want to just willy-nilly implement something; I want them to be designed correctly. So I'll get started on that, but please feel free to give me your opinions about the design of them.
Also, if you want a separate option to remove line limits entirely, why?
This is exactly what I want - remove line limits entirely. Environment variables are not really useful on Windows unless you heavily use scripts. Usually you just run executable with desired variables to archive functionality (or using some config file as alternative).
However, could this be implemented by something like a function in the math library such that it's not a global option affecting all numbers? Would that be better? Should we have both?
For exactly my needs global option is preferable - I just want to see all numbers in range -1 < 0 < 1
with zero.
So if you you think that environment variables are needed - feel free to implement both. Personally I don't like to use environment switches, command arguments are more convenient for me.
Good to know. Let me get on that and see if I can come up with something that works for you.
I have added the two command line arguments (z
and C
). Could you please pull and test that they do what you want?
I'm not done yet, but the rest of the work is not really going to impact what you want. It's a way to query the status of those things so that I can write library functions to print them in different ways.
I've changed the options to -z
/--leading-zeroes
and -L
/--no-line-length
.
Working fine, thanks! Can you please add new tests to windows scripts? It is just a new lines with filename of appropriate test in tests_bc.bat
and tests_dc.bat
.
I'm sorry, I feel stupid, but I'm not sure what tests you want me to add. For these features? Or more tests in general?
You've added this one (and may be something else): https://github.com/gavinhoward/bc/blob/master/tests/bc/leadingzero.txt Windows script doesn't know about it yet.
I see. I've added that test to the Windows bat file, but once again, can you pull and test for me? The reason is that it needs to run the test twice, and I want to be sure that works for you.
A few changes are needed to differ leadingzero
test from leadingzero_z
: https://github.com/gavinhoward/bc/pull/44
Otherwise it works fine.
Nope. Thanks 👍
Can you please implement some new command line arguments?
0.123
instead of current.123