# Function parameter name with "In" prefix?

**URL:** <https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 25, 2019, 2:49pm UTC](https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248 "2019-06-25T14:49:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilya.83](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilya.83](https://forums.unrealengine.com/u/ilya.83)\
**Post date:** [June 25, 2019, 2:49pm UTC](https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248/1 "2019-06-25T14:49:59Z")

</div>

Why some functions have parameters with “In” prefix in parameter name?  
I understand the “Out” prefix for parameter name, but what does “In” prefix mean? There is no info about it in Coding Standards or elsewhere.

---

<div class="post-metadata">

**Author:** ![GarnerP57](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GarnerP57](https://forums.unrealengine.com/u/GarnerP57)\
**Post date:** [June 25, 2019, 4:41pm UTC](https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248/2 "2019-06-25T16:41:42Z")

</div>

As far as I know “out” indicates that it is passed by reference and expects something to be returned using the reference while “in” doesn’t and can be passed by const ref or by value. Correct me if I am wrong.

---

<div class="post-metadata">

**Author:** ![ilya.83](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilya.83](https://forums.unrealengine.com/u/ilya.83)\
**Post date:** [June 25, 2019, 5:17pm UTC](https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248/3 "2019-06-25T17:17:47Z")

</div>

But some functions have const & parameters without “In” prefix, for example

```
UEngine::AddOnScreenDebugMessage(... const FString& DebugMessage, bool bNewerOnTop, const FVector2D& TextScale)

```

And some have const & parameters with “In” prefix, for example

```
FReply NativeOnFocusReceived (const FGeometry& InGeometry, const FFocusEvent& InFocusEvent)

```

It isn’t clear what is the meaning of this “In” prefixes…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_57741f591](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_57741f591](https://forums.unrealengine.com/u/anonymous_user_57741f591)\
**Post date:** [June 25, 2019, 5:30pm UTC](https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248/4 "2019-06-25T17:30:02Z")

</div>

Putting “In” at the beginning of a parameter name has no mechanical function, it’s just to communicate to the person reading the API that the parameter is undoubtedly an input parameter as opposed to an output parameter. In other words, they are trying to reassure you that the caller will gain no new information from this referenced variable once the call to the function completes. This is mostly used in an API that contains mixed “out” variables along with the regular “in” kind.

In terms of code standards though, you’ll find a lot of standards heavily discourage ever using “out” variables because they are confusing and sometimes even impact performance negatively. Generally parameters should just be the “in” kind, and if you do this the need to ever use “in” at the beginning of a parameter name becomes completely pointless since it is implied that all of your API uses “in” params.

---

<div class="post-metadata">

**Author:** ![GarnerP57](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GarnerP57](https://forums.unrealengine.com/u/GarnerP57)\
**Post date:** [June 25, 2019, 5:55pm UTC](https://forums.unrealengine.com/t/function-parameter-name-with-in-prefix/451248/5 "2019-06-25T17:55:43Z")

</div>

It is additional information and often left out I guess since you can just look at the parameter and you will know if it is const or not.
