add a trailing zero to $float
This commit is contained in:
parent
4b09baa0a0
commit
33fcd11236
1 changed files with 2 additions and 0 deletions
|
|
@ -254,6 +254,8 @@ proc nimFloatToStr(x: float): string {.compilerproc.} =
|
|||
var buf: array [0..59, char]
|
||||
c_sprintf(buf, "%#.f", x)
|
||||
result = $buf
|
||||
if result[len(result)-1] == '.':
|
||||
result.add("0")
|
||||
|
||||
proc nimInt64ToStr(x: int64): string {.compilerRtl.} =
|
||||
result = newString(sizeof(x)*4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue