Feature #34

Missing 'to_decimal' function for Int

Added by Cédric RICARD almost 4 years ago. Updated about 3 years ago.

Status:Assigned Start:
Priority:Normal Due date:
Assigned to:Alain Prouté % Done:

0%

Category:Compiler
Target version:1.10
Platform: Triage Stage:Unreviewed
Resolution:

Description

There is a 'abs_to_decimal()' function for Int, but no 'to_decimal()' thus there is one for all other numerical types.

History

Updated by Alain Prouté almost 4 years ago

  • Status changed from New to Assigned

The reason was that I did not want to impose some precise formatting for Ints. A default to_decimal may be added to basis.anubis:

public define String
to_decimal
(
Int x
) =
if x < 0 then "-"+abs_to_decimal(x) else abs_to_decimal(x).

Note: I see it's already done in my version of basis.anubis.

Updated by Cédric RICARD about 3 years ago

  • Target version changed from 1.9 to 1.10
  • Platform deleted (All)

Also available in: Atom PDF