Bruce,

I think that setlocale() is what i need.

Thanks.

--- Bruce Vining <bvining@xxxxxxxxxxxxxxx> ha scritto:

The sprintf() API is locale sensitive so what you
need to do is specify a locale that uses the period
as a decimal point. One quick way to do that is to
WRKENVVAR and change the job level environment
variable LANG from whatever it currently is to
"/QSYS.LIB/EN_US.LOCALE". Assuming you haven't
modified this IBM supplied locale, running your
program should now show the period being used for
the formatting of doubles.

There are many, many other ways to specify a
locale. This is simply one quick and easy way.
Note that this change may also impact the running of
several other C library functions that are locale
sensitive.

Hope this helps,
Bruce
Bruce Vining Services

beppecosta <beppecosta@xxxxxxxxxxx> wrote:
I have a C program that prints a float with
sprintf.

The decimal point is comma. How can I have the point
separator instead ?

I have tried to compile with TGTCCSID(37), to
compile
from a job with CCSID(37) but it still prints with a
comma.

Thanks.




___________________________________
L'email della prossima generazione? Puoi averla con
la nuova Yahoo! Mail:
http://it.docs.yahoo.com/nowyoucan.html
--
This is the C programming iSeries / AS400 (C400-L)
mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
archives
at http://archive.midrange.com/c400-l.




Bruce
Bruce Vining Services
507-206-4178
--
This is the C programming iSeries / AS400 (C400-L)
mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
archives
at http://archive.midrange.com/c400-l.








___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].