Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculator and decimal point

Status
Not open for further replies.

tesar

Programmer
Mar 7, 2001
292
CZ
In my program (FoxPro 2.0) i use built-in calculator.
In my country as decimal point serve "," .
Accordingly ... set point to ",".
And basic calling:
on key label F9 do kalkulacka
...
procedure kalkulacka
acti wind calculator
retu

Unfortunately, although decimal point in calculator
appear as ",",
and i can write it from keyboard,
but i cannot hit with mouse in window calculator.
And, more badly, any load from variable to calculator
and vice versa ended with ",".
(It regard as nonnumeric character, so 45,24 ended as 45.)
I modify kalkulacka:

procedure kalkulacka
set point to iif(set("point") = "," , "." , ",")
acti wind calculator
retu

and then first F9...point is "."
and calculator is in full function,
second F9 return point to ","
as necessity in my country.
Is any way force calculator regard ","
fully as decimal point ?
Thank to your time wasted my question..
Tesar
 
DOS applications were never very "region" oriented because there was no central location to keep this information. Windows keeps this info in the registry, but DOS apps don't have any access to it. I'm afraid there is very little you can do to "fix" this - especially in FP 2.0. Of course you could always write your own calculator screen and allow it to work anyway you want.

Rick
 
Rick, I agree.
Problem is not too weighty,
as switching between "," and "." is not hard.
Only reason why arise my thread was small possibility
undocumented parameter by acti calc...
I see unfortunately not, but I stay by standard.
Simply before each report i add
set point to ","
, not create own calculator.
Tesar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top