ProtoFlux:Null Coalesce: Difference between revisions

From Resonite Wiki
Create page, early initial documentation - correct page this time
 
Updated description. Filled in the rest of the node page.
 
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 14:09, 27 June 2024

??
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