[SERVER-27852] CLI formatter for doubles should emit {value}.0 for doubles with no fractional component Created: 29/Jan/17 Updated: 06/Dec/22 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | features we're not sure of |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Buzz Moschetti | Assignee: | Backlog - Server Tooling and Methods (STM) (Inactive) |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | move-sa, move-stm, platforms-re-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Tooling & Methods
|
| Participants: |
| Description |
|
A common thing to do in the CLI is this:
and then copy and paste the output somewhere. As the field name hints here, K_dbl is double:
We really should add ".0" to make it totally obvious this is a double. |
| Comments |
| Comment by Jonathan Reams [ 01/Feb/17 ] |
|
I'm not sure this is really doable or desirable. In javascript all numbers are doubles unless they're one of our custom NumberInt or NumberLong types. I'd prefer not to make javascript numbers into a custom type - especially since "3" is just as valid a double as "3.0". Is there something about copying and pasting "3" instead of "3.0" that causes an error in another language? |
| Comment by Asya Kamsky [ 31/Jan/17 ] |
|
is the issue that we don't show that it's a float (all numbers in JS are floats) or that we would show NumberInt the exact same way? |