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

Arithmatic on a sub's parameters

Discussion in 'Support' started by djspits, Aug 22, 2017.

  1. djspits

    Joined:
    Apr 13, 2010
    Messages:
    189
    Likes Received:
    2
    The description of the SET command states:
    When the environment variables are a sub's parameters that is not true.

    Regards, DJ.
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    I don't believe GOSUB args are environment variables. Perhaps the docs could stand to be clearer on the point, but I don't think this is a bona-fide bug.
     
  3. djspits

    Joined:
    Apr 13, 2010
    Messages:
    189
    Likes Received:
    2
    Before someone writes WAD here, let's agree that although the de facto implementation of the current technical design may indeed be correct, that doesn't make that same design in any way intuitive, sensible or user friendly.

    If correctness of an implementation - given a technical design - is the criterium for being deemed "bona-fide" and the user does not have access to or influence on that design, reporting bugs will be a guessing game at best and should be removed from the forums user interface as a misleading feature.

    Regards, DJ.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    Charles is correct- GOSUB args are not environment variables, and cannot be used with SET /A.

    And since SET /A is solely for compatibility with CMD (which doesn't support GOSUB args), and @EVAL provides a lot more options for TCC, that's unlikely to change.
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    Sorry, DJ. I'm not trying to be an ass; that just kinda happens.
     

Share This Page