Dreadedentity – User talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(→‎params page: new section)
 
Line 12: Line 12:


Consider rewording your text or just moving it to the private page. It's not really relevant to params.
Consider rewording your text or just moving it to the private page. It's not really relevant to params.
Just noticed. The params command description already says "Parses input argument into array of private variables." So your note is kinda redundant information

Revision as of 08:47, 3 April 2019

params page

The note you left on the params page actually talks about a effect of private variables https://community.bistudio.com/wiki/private Not params itself. Params just has the side effect of creating new variables as private versions.

"Params gets around this, most likely, by creating a new, unique application-level variable under the hood, despite being of the same name."

Not "most likely". We know exactly what's happening. If you access a local variable the engine walks up all scopes and tries to find a existing varible with same name.

"private" variables just disable that check and only look in the current scope, and create a new variable if it doesn't exist yet.

Consider rewording your text or just moving it to the private page. It's not really relevant to params.

Just noticed. The params command description already says "Parses input argument into array of private variables." So your note is kinda redundant information