Init Check Bug? Re: Sizes and checks

Ed Kleban Ed at Kleban.com
Wed Dec 28 15:37:49 CST 2005




On 12/28/05 3:23 PM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 12/28/05 8:21 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
>   
>>   if Valentina.cacheSize <> ValentinaCacheSize then
>>     alert( here, "Database failed to initialize.  CacheSize = " _
>>             + str(Valentina.cacheSize) )
> 
> Actually this is wrong idea check init success in SUCH way.
> 
> Because if you ask TOO many RAM for cache, Valentina can allocate less.
> So you cannot compare.

That explains the difference.  But what is the correct test?
Should I test for 
    Valentina.cacheSize > 0
???

> ------
> Strange number ... Looks to be in FLOAT way.
> Hmm.  Valentina.cacheSize declared as integer ?
> 
> I think, this is RB glitch, may be you need Foramt()
> 

Yes, it's the result of the "str" function which resorts to scientific
notation if the number of significant digits is large, including for
integers.  Rumor has it that it won't be doing so for much longer.






More information about the Valentina mailing list