PDA

View Full Version : Localization problem. '.' vs. ','



Mdreyer
06-05-2010, 12:22 PM
Hi all,

This might have come up before, but I couldn't find it.
I wrote an image processing package, which is also used in Germany.
The question:
How do I force PV-Wave to always use '.' as a decimal separator?
or
How does PV-Wave choose what it uses?

Yes, in input/output there are workarounds. But, for example:

z = 1.5 ; or z=1,5
e = "a=congrid(dist(100),100*"+string(z)+",100*"+string(z)+")"
Print,execute(e)

would fail since
e="a=congrid(dist(100),100* 1,5,100* 1,5)"
instead of
e="a=congrid(dist(100),100* 1.5,100* 1.5)"

I do use similar code in some places.

any thoughts?

Michael

rwagner
06-06-2010, 01:55 PM
I do not believe there is a way to make the parser interpret "," as ".". I believe the PV-WAVE interpreter always defaults to the US decimal format.

The IO examples as well as modifying the system locale will allow for print statements to be formatted correctly as you mentioned.

-Ryan