1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Version number

Discussion in 'Suggestions' started by K_Meinhard, Sep 15, 2008.

  1. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    312
    Likes Received:
    0
    Hi Rex,

    I just stumbled overe the version number. The latest shows here as

    9,02.152

    AFAIK the first separator is localized, so the comma shown here would be
    a point in the US. Is the second one always a point, or does it show as
    comma in the US?

    It seems to me that this makes version comparison in batches (that's
    where I stumbled upon this) so much harder to port to other countries.

    Mit freundlichem Gruß,

    Klaus Meinhard
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    K_Meinhard wrote:
    | Hi Rex,
    |
    | I just stumbled overe the version number. The latest shows here as
    |
    | 9,02.152
    |
    | AFAIK the first separator is localized, so the comma shown here would
    | be
    | a point in the US. Is the second one always a point, or does it show
    | as
    | comma in the US?
    |
    | It seems to me that this makes version comparison in batches (that's
    | where I stumbled upon this) so much harder to port to other countries.

    The %@verinfo[] function seems to report values independently of the
    setdos/g settings. This is the list of all non-empty values for files in the
    TCMD distribution, identical for comma and period as decimal separator:

    2, 4, 0, 1 Bchild.dll
    9.02.152 English.dll
    6.1.0.3022 ipworks6.dll
    6.2.0.3022 ipwssl6.dll
    9.02.152 takecmd.dll
    9.02.152 tcc.exe
    9.02.152 tcmd.exe
    4.4.0.0 WiFiMan.dll

    Note the field separators in Bchild.dll's string!

    Similarly, the VER command reports for TCC.EXE are identical, but notice the
    WinXP(SP3) report:

    DecimalChar|VER report
    -----------+-----------------------------------------------
    period |TCC 9.02.152 Windows XP [Version 5.1.2600]
    comma |TCC 9.02.152 Windows XP [Version 5.1,2600]

    -----------+-----------------------------------------------

    Only the _4VER variable reports an ostensibly decimal number. Because it is
    a number, the conditional expression "%_ver GT 6" is a valid comparison
    regardless of the value of the DecimalChar directive; version 6.00 (6,00 in
    German) would be false, 6.01 (6,01 in German) true.

    Try the function

    function version_string=`%@verinfo[%_cmdspec]`

    or put into TCSTART.BTM the command

    set _4ver=%@verinfo[%_cmdspec]

    which would override the internal variable _4ver.
    --
    HTH, Steve
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    K_Meinhard wrote:
    | Hi Rex,
    |
    | I just stumbled overe the version number. The latest shows here as
    |
    | 9,02.152
    |
    | AFAIK the first separator is localized, so the comma shown here would
    | be
    | a point in the US. Is the second one always a point, or does it show
    | as
    | comma in the US?
    |
    | It seems to me that this makes version comparison in batches (that's
    | where I stumbled upon this) so much harder to port to other countries.

    The %@verinfo[] function seems to report values independently of the
    setdos/g settings. This is the list of all non-empty values for files in the
    TCMD distribution, identical for comma and period as decimal separator:

    2, 4, 0, 1 Bchild.dll
    9.02.152 English.dll
    6.1.0.3022 ipworks6.dll
    6.2.0.3022 ipwssl6.dll
    9.02.152 takecmd.dll
    9.02.152 tcc.exe
    9.02.152 tcmd.exe
    4.4.0.0 WiFiMan.dll

    Note the field separators in Bchild.dll's string!

    Similarly, the VER command reports for TCC.EXE are identical, but notice the
    WinXP(SP3) report:

    DecimalChar|VER report
    -----------+-----------------------------------------------
    period |TCC 9.02.152 Windows XP [Version 5.1.2600]
    comma |TCC 9.02.152 Windows XP [Version 5.1,2600]

    -----------+-----------------------------------------------

    Only the _4VER variable reports an ostensibly decimal number. Because it is
    a number, the conditional expression "%_ver GT 6" is a valid comparison
    regardless of the value of the DecimalChar directive; version 6.00 (6,00 in
    German) would be false, 6.01 (6,01 in German) true.

    Try the function

    function version_string=`%@verinfo[%_cmdspec]`

    or put into TCSTART.BTM the command

    set _4ver=%@verinfo[%_cmdspec]

    which would override the internal variable _4ver.
    --
    HTH, Steve
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,092
    Likes Received:
    85
    K_Meinhard wrote:


    The version is displayed in a dozen ways and places -- which one are you
    referring to?

    Rex Conn
    JP Software
     
  5. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    312
    Likes Received:
    0
    Rex,


    VER, %_4ver

    Mit freundlichem Gruß,

    Klaus Meinhard
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,092
    Likes Received:
    85
    K_Meinhard wrote:


    You're using VER for comparisons??

    I'm *extremely* reluctant to change something that has behaved this way
    for the last 15 years. It would certainly break a LOT of batch files,
    and since you're the only person that's ever requested it, the risk to
    reward ratio doesn't seem attractive.

    Rex Conn
    JP Software
     
  7. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    312
    Likes Received:
    0
    JP Software Forums" <neil@jpsoft.com>; "rconn wrote:



    No, I stumbled over this (%_4ver) in someone else's batch, which didn't
    work here with, where the comma is the decimal divider


    Okay. How many Europeans are around here?

    Mit freundlichem Gruß,

    Klaus Meinhard
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,092
    Likes Received:
    85
    K_Meinhard wrote:

    Quite a few. But you're still the only person that's ever asked for it,
    and it would still break a lot of existing batch files!

    Rex Conn
    JP Software
     
  9. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    JP Software Forums" <neil@jpsoft.com>; "rconn wrote:
    | K_Meinhard wrote:
    |
    |
    |
    | Quite a few. But you're still the only person that's ever asked for
    | it,
    | and it would still break a lot of existing batch files!

    However, a new internal variable, e.g. _CPVER (i.e., Command Processor
    VERsion) would not break existing programs, and could satisfy the need for
    porting invariant version string. I would propose a format with fixed
    subfield widths, e.g., 09.02.152 for the latest released build of TCC (and
    TCMD).
    --
    Steve
     

Share This Page