How can I get the character used as decimal separator on the os?
Estimated Reading Time: < 1 MinuteIt's possible to retrieve this info using from isCOBOL the classes:
java.text.DecimalFormat
java.text.DecimalFormatSymbols
Here is a simple isCOBOL sample source:
program-id. prg.
configuration section.
repository.
class j as "java.text.DecimalFormat"
class j2 as "java.text.DecimalFormatSymbols"
working-storage section.
77 var pic x any length.
77 w-j object reference j.
77 w-j2 object reference j2.
procedure division.
main.
set w-j to j:>new()
set w-j2 to w-j:>getDecimalFormatSymbols()
set var to w-j2:>getDecimalSeparator()
display "Decimal separator is: " var.
stop run.