ProtoFlux:NullCoalesce: Difference between revisions

From Resonite Wiki
Create page, early initial documentation - correct page this time
 
m YoshBot moved page ProtoFlux:Null Coalesce to ProtoFlux:NullCoalesce: Automated: removing spaces from ProtoFlux namespace
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Type":"Dummy"},
{"Name":"A", "Type":"Dummy"},
{"Type":"Dummy"}
{"Name":"B", "Type":"Dummy"}
]
]
|Outputs=
|Outputs=
[
[
{"Type":"Dummy"}
{"Name":"*", "Type":"Dummy"}
]
]
|}}
|}}


The Null Coalesce operator takes two inputs. If the first input is <code>null</code>, it returns the value of the second input. Otherwise, it returns the value of the first input.
The '''Null Coalesce''' node takes two [[Reference Type|reference type]] inputs of the same type. If the first input is <code>null</code>, it returns the value of the second input. Otherwise, it returns the value of the first input.
 
== Inputs ==
 
=== A (Pseudo-Generic) ===
 
The first reference value to check.
 
=== B (Pseudo-Generic) ===
 
The second reference value to check.
 
== Outputs ==
 
=== * (Pseudo-Generic) ===
 
Returns the first non-null value found in order.
 
== See Also ==
* Wikipedia's definition of [https://en.wikipedia.org/wiki/Null_coalescing_operator null coalescing operator].
* Microsoft's documentation on the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-coalescing-operator null coalescing] operator.


[[Category:ProtoFlux:Stubs]]
[[Category:ProtoFlux:Operators]]
[[Category:ProtoFlux:Operators]]

Latest revision as of 00:28, 21 August 2025

??
A
*
B
Operators

The Null Coalesce node takes two reference type inputs of the same type. If the first input is null, it returns the value of the second input. Otherwise, it returns the value of the first input.

Inputs

A (Pseudo-Generic)

The first reference value to check.

B (Pseudo-Generic)

The second reference value to check.

Outputs

* (Pseudo-Generic)

Returns the first non-null value found in order.

See Also