[V4Rb 2] File format version

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 7 00:48:54 CDT 2005


On 10/7/05 12:38 AM, "Charles Yeomans" <yeomans at desuetude.com> wrote:

>>> I mean the Valentina database file format.  As you know, it changed
>>> from v1 to v2.  So I should write code like
>>> 
>>> If Valentina.GetDatabaseVersion((theFile) < &h200 then
>>> ...
>>> Else
>>> Msgbox "This is a v1 file."
>>> End if
>>> 
>>> Now suppose that you change the Valentina file format again.  What I
>>> want is a function that returns &h200 now, and the correct value in
>>> the
>>> future.
>> 
>> Charles,
>> 
>> You have not read my text deeply:
>> 
>>     this function EXTRACT version from db file !
>> 
>> So it will always work correctly for a given file
> 
> 
> Let's try this again.  I understand what Valentina.GetDatabaseVersion
> does; it tells me the file format version of the file.  V4Rb expects to
> see a certain database file format.  How am I to know what that format
> is, so that I can compare that to the value returned by
> Valentina.GetDatabaseVersion?
> 
> In other words, given the code
> 
> If Valentina.GetDatabaseVersion((theFile) < &h200 then
> 
> I want to replace the &h200 on the right-hand side with a Valentina
> module function that returns the file format version expected by V4Rb.

Okay, now I better see what you want.

    Function instead of numeric value?
    Function which return CURRENT format which plugin do use ?

if Valentina.GetDatabaseVersion((theFile) < &h200 then
 ...
Else
  Msgbox "This is a v1 file."
End if

Can you show code of task which you cannot solve now ?

    currentFormatVersion = new function you want()

    foundFormatVersion = Valentina.GetDatabaseVersion((theFile)

    if currentFormatVersion = foundFormatVersion

    else

    end 

? 


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list