Re: Strange behaviour of Str$
- From: "John Carlyle-Clarke" <john.cc@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 13:04:21 +0000
erewhon@xxxxxxxxxx (J French) wrote in
news:4305be23.94347820@xxxxxxxxxxxxxxxxxxxx:
> On Fri, 19 Aug 2005 09:03:17 +0000, "John Carlyle-Clarke"
> <john.cc@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>>At that point, I got an error which looks like it was caused by
>>Str$ returning a number like 2.94 as "2,94".
>
> I would be very surprized if that is really what happened
>
> - Tony explained the Str$() Val() behaviour
>
> Most likely you have a rogue CStr() lurking around
>
> There is some horrible Windows message that notifies Apps of
> settings changes, but I doubt that it would affect Str$()
>
> Put this in a module (one of my favourite tricks for flushing
> things out) :
>
> Public Function CStr( A$, B$) As Object
> End Function
>
> A [Ctl F5] will get the blighter
>
> IMO, and I am in a minority, avoid /anything/ that is locale aware
> - you can build in your own stuff at the presentation layer
> - which makes testing far easier
> - but using locale aware stuff is asking for trouble ...
I agree with what you say, and I like the trick for finding the CStr
occurences. Mostly this app is not locale aware, apart from controls
at the presentation layer which use our own formatting routines.
Personally I think the greatest problem is implicit conversions, e.g.
when using variants. They are very hard to find!
However, I am certain that it is Str$ which is causing the problem.
See my post on how to reproduce.
.
- References:
- Strange behaviour of Str$
- From: John Carlyle-Clarke
- Re: Strange behaviour of Str$
- From: J French
- Strange behaviour of Str$
- Prev by Date: Re: Strange behaviour of Str$
- Next by Date: Re: Opening Files on Web Server
- Previous by thread: Re: Strange behaviour of Str$
- Next by thread: Re: Strange behaviour of Str$
- Index(es):
Relevant Pages
|