Posts: 1,271
Threads: 399
Joined: Mar 2003
is it possible to tell qm to accept comma in double variables ?
that could spare me some formating lines,
because may client prefers to see prices with comma and
even the mdb saves with comma (i know that be changed ...)
thanks
Posts: 12,140
Threads: 142
Joined: Dec 2002
QM functions use only . as decimal separator. Maybe some API functions can format/parse strings where , is decimal separator but I don't know, needs to look in MSDN.
Posts: 12,140
Threads: 142
Joined: Dec 2002
double d=1.23
str s
setlocale LC_NUMERIC "Lithuanian"
s.fix(_snprintf(s.all(1000) 1000 "%g" d))
out s
double dd=atof(s)
out dd
;Here "Lithuanian" is a locale where , is decimal separator
;by default (but can be changed in Control Panel -> Regional...).
;Read more in MSDN Library.
;Note that setlocale changes locale for whole process (all threads).
;Intrinsic QM functions are not affected, unless you use QM 2.2.0 (then don't use setlocale).