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

Documentation @INC

Discussion in 'Support' started by Joe Caverly, Dec 31, 2016.

  1. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    676
    Likes Received:
    8
    In the Help file for @INC...

    Should
    Code:
    set start=5
    set result=%inc[start]
    echo %result
    not be this;
    Code:
    set start=5
    set result=%@inc[start]
    echo %result
    Seems to be missing an @

    Joe
     
  2. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    I think it should really be
    Code:
    set result=%@inc[%start]
    It looks like it's missing a % as well as an @.
     
  3. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    676
    Likes Received:
    8
    Well, according to the line;
    Code:
    If string is the name of an environment variable, its value is used whether or not it is preceded by a percent mark % without modifying the value of the variable. To actually increment the value of the variable var use
    I think it should be just start , not %start.

    Joe
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,935
    Likes Received:
    30
    Either works.
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    The help is missing the @.

    However, that function is generally obsolete (replaced by the SET /A functionality). Or just use @EVAL (which @INC calls anyway).
     

Share This Page