pval

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    pval

    This may be a stupid question, but what does the 'p' in pval actually stand for? Does it stand for anything?

    (I have my own guess, but it's just a guess and I'd like to avoid biasing replies.)
  • Julian
    Adept
    • Apr 2021
    • 122

    #2
    Originally posted by AnonymousHero
    This may be a stupid question, but what does the 'p' in pval actually stand for? Does it stand for anything?

    (I have my own guess, but it's just a guess and I'd like to avoid biasing replies.)
    Probably either ‘power’ or ‘plus'

    Comment

    • Sideways
      Knight
      • Nov 2008
      • 896

      #3
      In Moria/UMoria and very early Angband, pval was called p1; and object description code included the additional parameters p2 through p6, although only p1 was an actual variable name. P2 through P4 were explicitly glossed as plusses (they were stand-ins for +to-hit, +to-dam and +to-ac), but it's still unclear to me whether P in these parameters actually stood for plus or for parameter. I believe Ben was responsible for changing the variable's name from p1 to pval.

      I believe that at some point I did gloss pval as plus value; but whether I knew something about the name's origins then that I've forgotten since or if I just made an editorial decision based on pvals being used as plus values in the present day, I do not know. Modern Vanilla code calls pval an "item extra-parameter" in the comments, but that is also a latter-day development. The current Frog glossary simply describes the purpose of a pval without implying that the word stands for anything specific.
      The Complainer worries about the lack of activity here these days.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9647

        #4
        I was hoping for "potato".
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • nomapryor
          Rookie
          • Oct 2021
          • 1

          #5
          I had the same thought.
          slope game

          Comment

          • AnonymousHero
            Veteran
            • Jun 2007
            • 1393

            #6
            Brb, gotta rename a few variables to potatoVal...

            Comment

            • fph
              Veteran
              • Apr 2009
              • 1030

              #7
              Originally posted by Nick
              I was hoping for "potato".
              Now it's official. Nick spoke, maintainer's authority.
              --
              Dive fast, die young, leave a high-CHA corpse.

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎