Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   pval (http://angband.oook.cz/forum/showthread.php?t=10926)

AnonymousHero October 6, 2021 18:48

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 October 6, 2021 20:02

Quote:

Originally Posted by AnonymousHero (Post 155653)
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'

Sideways October 7, 2021 03:33

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.

Nick October 7, 2021 03:48

I was hoping for "potato".

nomapryor October 13, 2021 11:54

I had the same thought.

AnonymousHero October 14, 2021 21:21

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

fph October 15, 2021 08:36

Quote:

Originally Posted by Nick (Post 155663)
I was hoping for "potato".

Now it's official. Nick spoke, maintainer's authority.


All times are GMT +1. The time now is 07:52.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.