Re: Strange behaviour of Str$
- From: "Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 11:32:06 +0100
Str/Val both ignore the user's regional settings. They always use the ".".
This is actually very useful if you're generating SQL/MDX queries with
floating-point constants in, or generating VB/VBScript source code, or
reading locale-independent decimal values from a file.
Most people would say they are "not locale aware". I prefer to view them as
honouring a "programming locale" (i.e. most programming languages use
US-format decimal values, and sometimes even US-format date values - as with
VB)
Tony Proctor
"John Carlyle-Clarke" <john.cc@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:Xns96B76676367CCjohncceuroplacercouk@xxxxxxxxxxxxxxx
> My application was running on an XP SP2 machine, with the regional
> settings set to give a "." as the decimal separator.
>
> I went into the control panel, and changed the settings to a ","
> decimal separator, while the app was running.
>
> At that point, I got an error which looks like it was caused by Str$
> returning a number like 2.94 as "2,94". This code runs on a regular
> timer, and the error only occured once. It also doesn't occur if you
> switch regions with the app shut down.
>
> Is this known behaviour?
.
- Follow-Ups:
- Re: Strange behaviour of Str$
- From: John Carlyle-Clarke
- Re: Strange behaviour of Str$
- References:
- Strange behaviour of Str$
- From: John Carlyle-Clarke
- Strange behaviour of Str$
- Prev by Date: Change to cursor to an Hourglass on export
- Next by Date: Re: Layout of a file written by VB6?
- Previous by thread: Strange behaviour of Str$
- Next by thread: Re: Strange behaviour of Str$
- Index(es):
Relevant Pages
|